protocol

hash_digest_protocol

Protocol for fixed-size cryptographic hash functions exposing raw digests and digest metadata.

Availability:
logtalk_load(hashes(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-04-16
Compilation flags:
static
Extends:
Remarks:
(none)
Inherited public predicates:

Public predicates

digest/2

Computes the digest for a list of bytes and returns it as a list of bytes.

Compilation flags:
static
Template:
digest(Bytes,Digest)
Mode and number of proofs:
digest(+list(byte),--list(byte)) - one

digest_size/1

Returns the digest size in bytes.

Compilation flags:
static
Template:
digest_size(DigestSize)
Mode and number of proofs:
digest_size(--integer) - one

block_size/1

Returns the hash block size in bytes.

Compilation flags:
static
Template:
block_size(BlockSize)
Mode and number of proofs:
block_size(--integer) - one

Protected predicates

(no local declarations; see entity ancestors if any)

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)