- ext
- ssl
- ssl.pl -- Secure Socket Layer (SSL) library
- crypto.pl -- Cryptography and authentication library
- crypto_n_random_bytes/2
- crypto_data_hash/3
- crypto_file_hash/3
- crypto_context_new/2
- crypto_data_context/3
- crypto_context_hash/2
- crypto_open_hash_stream/3
- crypto_stream_hash/2
- crypto_password_hash/2
- crypto_password_hash/3
- crypto_data_hkdf/4
- ecdsa_sign/4
- ecdsa_verify/4
- hex_bytes/2
- rsa_private_decrypt/4
- rsa_private_encrypt/4
- rsa_public_decrypt/4
- rsa_public_encrypt/4
- rsa_sign/4
- rsa_verify/4
- crypto_data_decrypt/6
- crypto_data_encrypt/6
- crypto_modular_inverse/3
- crypto_generate_prime/3
- crypto_is_prime/2
- crypto_name_curve/2
- crypto_curve_order/2
- crypto_curve_generator/2
- crypto_curve_scalar_mult/4
- xmldsig.pl -- XML Digital signature
- xmlenc.pl -- XML encryption library
- ssl
- crypto_data_hash(+Data, -Hash, +Options) is det
- Hash is the hash of Data. The conversion is controlled
by Options:
- algorithm(+Algorithm)
- One of
md5
(insecure),sha1
(insecure),ripemd160
,sha224
,sha256
,sha384
,sha512
,sha3_224
,sha3_256
,sha3_384
,sha3_512
,blake2s256
orblake2b512
. 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. - 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, 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.
- Arguments:
-
Data - is either an atom, string or code-list Hash - is an atom that represents the hash in hexadecimal encoding. - See also
- - hex_bytes/2 for conversion between hexadecimal encoding and lists of bytes.
- - crypto_password_hash/2 for the important use case of passwords.