CryptDigest
Returns a binary hash value generated by the specified cryptographic hash algorithm.
Format
CryptDigest ( data ; algorithm )
Parameters
data
- any text expression or field from which to generate the hash.
algorithm
- the name of the cryptographic algorithm to use (see CryptAuthCode function).
Data type returned
container
Originated in version
16.0
Description
Use the Base64EncodeRFC and Base64Decode or HexEncode and HexDecode functions to control the encoding of the returned hash.
Example 1
In the Results container field, stores a file containing the digest of the text in the Message field using the default algorithm.
Set Field [ Table::Results ; CryptDigest ( Table::Message ; "" ) ]
Example 2
Returns a digest of the contents of the $JSON variable using the SHA512 algorithm. The container data returned by CryptDigest is returned as Base64-encoded text.
Base64EncodeRFC ( 4648; CryptDigest ( $JSON ; "SHA512" ) )