- algorithm(+Algorithm)
- One of
md5
,sha1
,sha224
,sha256
(default),sha384
,sha512
,blake2s256
orblake2b512
. TheBLAKE
digest algorithms require OpenSSL 1.1.0 or greater. - encoding(+Encoding)
- 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 isoctet
, claiming that Data contains raw bytes. - hmac(+Key)
- If this option is specified, a hash-based message authentication code (HMAC) is computed, using the specified Key which is either an atom or string. 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. |
- See also
- hex_bytes/2 for conversion between hashes and lists.