The digest functions are mathematical functions that compute a digest key for a document. Identical documents have the same digest key; if you change part of the document, the digest key is different. These functions are very useful for checking data integrity when you exchange or compare data. In 4D v16 R5, 4D has enhanced the Generate digest command to support SHA-2 algorithms following security recommendations.
The Generate digest command now supports two new algorithms of the SHA-2 family: SHA-256 and SHA-512. The syntax has not changed, but two new constants have been added:
- SHA256 digest
- SHA512 digest
$varDigest:=Generate digest($myMessage;SHA256 digest)