Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

TPJMD5Digest Record

Project: MD5 Message Digest Unit

Unit: PJMD5

Applies to: ~>1.0

Description

TPJMD5Digest is a record that encapsulates a MD5 digest produced by hashing an octet stream using the MD5 message digest algorithm. These digests are produced by the TPJMD5 class.

The record enables the digest to be cast to and from strings and TBytes byte arrays. It also permits digests to be tested for equality and inequality. In addition the digest data can be accessed either as an array of bytes or as long words.

Fields

TPJMD5Digest is a variant record which provides three different ways of accessing the digest data:

Field Description
Bytes This array provides access to each of the 16 bytes of the digest. It is indexed from 0 to 15.
LongWords This array provides access the each of the 4 long words that make up the digest. It is indexed from 0 to 3.
A, B, C and D Each of these fields provide an alternate means of accessing the digest data as long words. A, B, C and D are aliases for the elements of the LongWords array at indexes 0, 1, 2 & 3 respectively.

Property

Property Description
Parts Default array property that provides an alternate means of access the digest as long words. Enables TPJMD5Digest variables to be directly indexed.

Operator Overloads

Operator Description
Implicit Enables TPJMD5Digest records to be cast to and from Unicode strings and TBytes byte arrays.
Equal Enables a TPJMD5Digest record to be compared for equality with another TPJMD5Digest, Unicode strings and TBytes byte arrays.
NotEqual Enables a TPJMD5Digest record to be compared for inequality with another TPJMD5Digest, Unicode strings and TBytes byte arrays.