Reference > Functions reference > Container functions > CryptDigest


Returns a binary hash value generated by the specified cryptographic hash algorithm.


CryptDigest ( data ; algorithm )


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 


Originated in version 



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" ) )

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas