:- use_module(library(crypto)).(can be autoloaded)
Admissible options are:
- A hashing algorithm as specified to crypto_data_hash/3. The default is a cryptographically secure algorithm. If you specify a variable, then it is unified with the algorithm that was used.
- Optional context and application specific information, specified as an atom, string or list of bytes. The default is the zero length atom” .
- Optionally, a list of bytes that are used as salt. The default is all zeroes.
octet, denoting the representation of Data as in crypto_data_hash/3.
info/1 option can be used to generate multiple keys
from a single master key, using for example values such as
iv, or the name of a file that is to be encrypted.
This predicate requires OpenSSL 1.1.0 or greater.
- See also
- crypto_n_random_bytes/2 to obtain a suitable salt.