Reference > Functions reference > Container functions > CryptDigest
 
CryptDigest
Purpose 
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 
FileMaker Pro 16.0
Description 
Use the Base64EncodeRFC and Base64Decode or HexEncode and HexDecode functions to control the encoding of the returned hash.
Notes 
This function is not supported in runtime solutions and returns "?".
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