`BLAKE2s` hash algorithm. See: - [[ https://datatracker.ietf.org/doc/html/rfc7693 ]] - [[ https://www.blake2.net/ ]]

Collection Info

View Source
Collection
core
Path
crypto/blake2s
Entries
9

Source Files

Constants

2

BLOCK_SIZE #

Source
BLOCK_SIZE :: _blake2.BLAKE2S_BLOCK_SIZE

BLOCK_SIZE is the BLAKE2s block size in bytes.

DIGEST_SIZE #

Source
DIGEST_SIZE :: _blake2.BLAKE2S_SIZE

DIGEST_SIZE is the BLAKE2s digest size in bytes.

Types

1

Context #

Source
Context :: Blake2s_Context

Context is a BLAKE2s instance.

Procedures

6

clone #

Source
clone :: proc(ctx, other: ^Blake2s_Context) {…}

clone clones the Context other into ctx.

final #

Source
final :: proc(ctx: ^Blake2s_Context, hash: []u8, finalize_clone: bool = false) {…}

final finalizes the Context, writes the digest to hash, and calls reset on the Context. If and only if (⟺) finalize_clone is set, final will work on a copy of the Context, which is useful for for calculating rolling digests.

init #

Source
init :: proc(ctx: ^Blake2s_Context, digest_size: int = DIGEST_SIZE) {…}

init initializes a Context with the default BLAKE2s config.

init_mac #

Source
init_mac :: proc(ctx: ^Blake2s_Context, key: []u8, digest_size: int = DIGEST_SIZE) {…}

init_mac initializes a Context with a user provided key.

reset #

Source
reset :: proc(ctx: ^Blake2s_Context) {…}

reset sanitizes the Context. The Context must be re-initialized to be used again.

update #

Source
update :: proc(ctx: ^Blake2s_Context, data: []u8) {…}

update adds more data to the Context.