Libraries
Msgdigest Source Code
 previous   up   next 

Types
digestAlgorithm
Enumeration of message digest algorithms.

digestAlgorithm

const type: digestAlgorithm

Enumeration of message digest algorithms. Defines: NO_DIGEST, MD4, MD5, RIPEMD160, SHA1, SHA224, SHA256, SHA384 and SHA512.


Function Summary
string
md4 (in var string: message)
Compute a message digest with the MD4 message digest algorithm.
string
md5 (in var string: message)
Compute a message digest with the MD5 message digest algorithm.
string
ripemd160 (in var string: message)
Compute a message digest with the RIPEMD-160 message digest algorithm.
string
sha1 (in var string: message)
Compute a message digest with the SHA-1 secure hash algorithm.
string
sha224 (in var string: message)
Compute a message digest with the SHA-224 secure hash algorithm.
string
sha256 (in var string: message)
Compute a message digest with the SHA-256 secure hash algorithm.
string
sha384 (in var string: message)
Compute a message digest with the SHA-384 secure hash algorithm.
string
sha512 (in var string: message)
Compute a message digest with the SHA-512 secure hash algorithm.
string
msgDigest (in digestAlgorithm: digestAlg, in string: message)
Compute a message digest with the given digestAlgorithm.
integer
blockSize (in digestAlgorithm: digestAlg)
Block size used by the given digestAlgorithm.
integer
digestSize (in digestAlgorithm: digestAlg)
Size of a message digest computed with the given digestAlgorithm.

Function Detail

md4

const func string: md4 (in var string: message)

Compute a message digest with the MD4 message digest algorithm. The security of MD4 has been severely compromised. This function is provided for backward compatibility.

Returns:
the MD4 message digest (a string of 16 bytes).
Raises:
RANGE_ERROR - If message contains a character beyond '\255;'.

md5

const func string: md5 (in var string: message)

Compute a message digest with the MD5 message digest algorithm. MD5 is considered to be cryptographically broken. This function is provided for backward compatibility.

Returns:
the MD5 message digest (a string of 16 bytes).
Raises:
RANGE_ERROR - If message contains a character beyond '\255;'.

ripemd160

const func string: ripemd160 (in var string: message)

Compute a message digest with the RIPEMD-160 message digest algorithm.

Returns:
the RIPEMD-160 message digest (a string of 20 bytes).
Raises:
RANGE_ERROR - If message contains a character beyond '\255;'.

sha1

const func string: sha1 (in var string: message)

Compute a message digest with the SHA-1 secure hash algorithm.

Returns:
the SHA-1 message digest (a string of 20 bytes).
Raises:
RANGE_ERROR - If message contains a character beyond '\255;'.

sha224

const func string: sha224 (in var string: message)

Compute a message digest with the SHA-224 secure hash algorithm.

Returns:
the SHA-224 message digest (a string of 28 bytes).
Raises:
RANGE_ERROR - If message contains a character beyond '\255;'.

sha256

const func string: sha256 (in var string: message)

Compute a message digest with the SHA-256 secure hash algorithm.

Returns:
the SHA-256 message digest (a string of 32 bytes).
Raises:
RANGE_ERROR - If message contains a character beyond '\255;'.

sha384

const func string: sha384 (in var string: message)

Compute a message digest with the SHA-384 secure hash algorithm.

Returns:
the SHA-384 message digest (a string of 48 bytes).
Raises:
RANGE_ERROR - If message contains a character beyond '\255;'.

sha512

const func string: sha512 (in var string: message)

Compute a message digest with the SHA-512 secure hash algorithm.

Returns:
the SHA-512 message digest (a string of 64 bytes).
Raises:
RANGE_ERROR - If message contains a character beyond '\255;'.

msgDigest

const func string: msgDigest (in digestAlgorithm: digestAlg, in string: message)

Compute a message digest with the given digestAlgorithm.

Parameters:
digestAlg - The digestAlgorithm to be used.
Returns:
the message digest of the message.
Raises:
RANGE_ERROR - If message contains a character beyond '\255;'.

blockSize

const func integer: blockSize (in digestAlgorithm: digestAlg)

Block size used by the given digestAlgorithm.

Returns:
the block size in bytes used by the message digest algorithm.

digestSize

const func integer: digestSize (in digestAlgorithm: digestAlg)

Size of a message digest computed with the given digestAlgorithm.

Returns:
the size of a message digest in bytes.


 previous   up   next