category

blake2_core(Key,DigestSize)

  • Key - A list of key bytes. Use the empty list for unkeyed hashing.

  • DigestSize - Number of digest bytes to generate.

Common BLAKE2 hash function core.

Availability:
logtalk_load(hashes(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-08-02
Compilation flags:
static
Remarks:
(none)

Public predicates

(no local declarations; see entity ancestors if any)

Protected predicates

blake2_max_digest_size/1

Returns the maximum digest size in bytes for the BLAKE2 variant.

Compilation flags:
static
Template:
blake2_max_digest_size(MaxDigestSize)
Mode and number of proofs:
blake2_max_digest_size(--integer) - one

blake2_max_key_size/1

Returns the maximum key size in bytes for the BLAKE2 variant.

Compilation flags:
static
Template:
blake2_max_key_size(MaxKeySize)
Mode and number of proofs:
blake2_max_key_size(--integer) - one

blake2_block_size/1

Returns the block size in bytes for the BLAKE2 variant.

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

blake2_round_count/1

Returns the number of compression rounds for the BLAKE2 variant.

Compilation flags:
static
Template:
blake2_round_count(RoundCount)
Mode and number of proofs:
blake2_round_count(--integer) - one

blake2_initial_state/2

Computes the initial hash state from the parameter word.

Compilation flags:
static
Template:
blake2_initial_state(ParameterWord,InitialState)
Mode and number of proofs:
blake2_initial_state(+integer,--list(integer)) - one

blake2_working_vector/4

Initializes the compression working vector from the hash state, byte counter, and final block flag.

Compilation flags:
static
Template:
blake2_working_vector(State,Total,Final,WorkingVector)
Mode and number of proofs:
blake2_working_vector(+list(integer),+integer,+boolean,--list(integer)) - one

blake2_block_words/2

Decodes a block of bytes into the message words used by the compression function.

Compilation flags:
static
Template:
blake2_block_words(Block,MessageWords)
Mode and number of proofs:
blake2_block_words(+list(byte),--list(integer)) - one

blake2_g/8

Applies the BLAKE2 G mixing function to four indexed words of the working vector and two message words.

Compilation flags:
static
Template:
blake2_g(WorkingVector0,AIndex,BIndex,CIndex,DIndex,X,Y,WorkingVector)
Mode and number of proofs:
blake2_g(+list(integer),+integer,+integer,+integer,+integer,+integer,+integer,--list(integer)) - one

blake2_finalize/4

Finalizes the hash state by combining it with the compression working vector.

Compilation flags:
static
Template:
blake2_finalize(HashState,WorkingVector,Index,FinalState)
Mode and number of proofs:
blake2_finalize(+list(integer),+list(integer),+integer,--list(integer)) - one

blake2_state_bytes/2

Encodes the hash state words as little-endian bytes.

Compilation flags:
static
Template:
blake2_state_bytes(State,Bytes)
Mode and number of proofs:
blake2_state_bytes(+list(integer),--list(byte)) - one

replace_nth0/4

Replaces the element at the zero-based index in a list.

Compilation flags:
static
Template:
replace_nth0(Index,List0,Element,List)
Mode and number of proofs:
replace_nth0(+integer,+list,+term,--list) - one

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)