:- use_module(library(crypto)).(can be autoloaded)
- One of
blake2b512. The BLAKE digest algorithms require OpenSSL 1.1.0 or greater, and the SHA-3 algorithms require OpenSSL 1.1.1 or greater. The default is a cryptographically secure algorithm. If you specify a variable, then that variable is unified with the algorithm that was used.
- If Data is a sequence of character codes, this must be
translated into a sequence of bytes, because that is what the
hashing requires. The default encoding is
utf8. The other meaningful value is
octet, claiming that Data contains raw bytes.
- If this option is specified, a hash-based message authentication code (HMAC) is computed, using the specified Key which is either an atom, string or list of bytes. Any of the available digest algorithms can be used with this option. The cryptographic strength of the HMAC depends on that of the chosen algorithm and also on the key. This option requires OpenSSL 1.1.0 or greater.
|Data||is either an atom, string or code-list|
|Hash||is an atom that represents the hash in hexadecimal encoding.|