myHashModule := STD.Crypto.Hashing(hashAlgorithm);
myHashModule | The name of the Hashing module structure |
hashAlgorithm | The hashing algorithm to use, as returned by SupportedHashAlgorithms() |
A Hashing module is defined in ECL. Subsequent function definitions use the module definitions specified in the Hashing module definition.
Example:
Import STD; //Hashing module definition myHashModuleSha512 := Std.Crypto.Hashing('sha512'); myHashModuleSha256 := Std.Crypto.Hashing('sha256'); DATA hash1 := myHashModuleSha512.Hash((DATA)'The quick brown fox jumps over the lazy dog'); DATA hash2 := myHashModuleSha256.Hash((DATA)'The quick brown fox jumps over the lazy dog'); OUTPUT(hash1); OUTPUT(hash2);