protocol
hmac_protocol
Protocol for one-shot HMAC digest computation using hash objects implementing hash_digest_protocol.
Availability:
logtalk_load(hmac(loader))Author: Paulo Moura
Version: 1:0:0
Date: 2026-04-16
Compilation flags:
staticDependencies:
(none)
Remarks:
(none)
Inherited public predicates:
(none)
Public predicates
digest/4
Computes the full HMAC digest for a hash object, key bytes, and message bytes.
Compilation flags:
staticTemplate:
digest(Hash,KeyBytes,MessageBytes,DigestBytes)Mode and number of proofs:
digest(+object_identifier,+list(byte),+list(byte),--list(byte)) - onehex_digest/4
Computes the full HMAC digest for a hash object, key bytes, and message bytes, returning a lowercase hexadecimal atom.
Compilation flags:
staticTemplate:
hex_digest(Hash,KeyBytes,MessageBytes,HexDigest)Mode and number of proofs:
hex_digest(+object_identifier,+list(byte),+list(byte),--atom) - onedigest/5
Computes a truncated HMAC digest containing the requested number of leftmost bytes.
Compilation flags:
staticTemplate:
digest(Hash,KeyBytes,MessageBytes,Length,DigestBytes)Mode and number of proofs:
digest(+object_identifier,+list(byte),+list(byte),+integer,--list(byte)) - onehex_digest/5
Computes a truncated HMAC digest containing the requested number of leftmost bytes and returns it as a lowercase hexadecimal atom.
Compilation flags:
staticTemplate:
hex_digest(Hash,KeyBytes,MessageBytes,Length,HexDigest)Mode and number of proofs:
hex_digest(+object_identifier,+list(byte),+list(byte),+integer,--atom) - oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)
See also