protocol
hash_protocol
Hashing protocol. Hash values are returned as lowercase hexadecimal atoms using the output width of each algorithm or extensible-output function instance.
Availability:
logtalk_load(hashes(loader))Author: Paulo Moura
Version: 1:1:0
Date: 2026-10-12
Compilation flags:
staticDependencies:
(none)
Remarks:
(none)
Inherited public predicates:
(none)
Public predicates
hash/2
Computes the hash for a list of bytes.
Compilation flags:
staticTemplate:
hash(Bytes,Hash)Mode and number of proofs:
hash(+list(byte),--atom) - one_or_errorExceptions:
The key, digest size, or output length is not sufficiently instantiated::
instantiation_errorThe digest size is invalid for BLAKE2::
domain_error(blake2_digest_size,DigestSize)The key is ground but invalid for BLAKE2::
domain_error(blake2_key,Key)The key is ground but not a list of 16 bytes for SipHash::
domain_error(siphash_key,Key)The output length is ground but not a nonnegative integer for SHAKE::
domain_error(shake_output_size,OutputBytes)Protected predicates
(none)
Private predicates
(none)
Operators
(none)