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

Collection Info

View Source
Collection
core
Path
crypto/blake2b
Entries
9

Source Files

Constants

2

BLOCK_SIZE #

Source
BLOCK_SIZE :: _blake2.BLAKE2B_BLOCK_SIZE

BLOCK_SIZE is the BLAKE2b block size in bytes.

DIGEST_SIZE #

Source
DIGEST_SIZE :: _blake2.BLAKE2B_SIZE

DIGEST_SIZE is the BLAKE2b digest size in bytes.

Types

1

Context #

Source
Context :: Blake2b_Context

Context is a BLAKE2b instance.

Procedures

6

clone #

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

clone clones the Context other into ctx.

final #

Source
final :: proc(ctx: ^Blake2b_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: ^Blake2b_Context, digest_size: int = DIGEST_SIZE) {…}

init initializes a Context with the default BLAKE2b config.

init_mac #

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

init_mac initializes a Context with a user provided key.

reset #

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

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

update #

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

update adds more data to the Context.