Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Window Wrinum X.509 Xmldom Xml_ent Zip
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, SHA1, SHA224 and SHA256.


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
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
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 - When 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 - When 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 - When 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 - When 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 - When 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 - When 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 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.


 previous   up   next