SNOBOL4DIGEST(3) | CSNOBOL4B 2.3.2 | Janurary 1, 2024

NAME

digest – message digest library

SYNOPSYS

-INCLUDE 'digest.sno'
	handle = DIGEST_INIT(algorithm)
	DIGEST_UPDATE(handle,string)
	bytes = DIGEST_FINAL(handle)
	string = DIGEST_HEX(bytes)
	bytes = DIGEST(algorithm,string)

DESCRIPTION

The digest module performs cryptographic Message Digest calculations.

DIGEST_INIT takes a digest algorithm name (as listed by openssl help) and returns an opaque handle to an object. Not all algorithms are implemented by all versions of the openssl library. Older algorithms have known collision weaknesses, Newer algorithms (and longer hash outputs) are slower!

DIGEST_UPDATE incorporates the string into the hash. Additional calls should produce the same result as concatenating the input strings to a single update call.

DIGEST_FINAL returns a string of binary bytes with the hash value and deletes the object and handle.

DIGEST_HEX takes a string of binary bytes and returns a string of lower case hex string.

DIGEST takes an algorithm name and a string to hash, and returns binary bytes.

See snobol4zlib(3) for CRC32 and ADLER32 hash algorithms.

SEE ALSO

snobol4(1), openssl(1), snobol4zlib(3).

AUTHOR

Phil Budne