core/crypto/blake2b
blake2b
Types
1Constants
2BLOCK_SIZE
BLOCK_SIZE :: BLAKE2B_BLOCK_SIZESourceBLOCK_SIZE is the BLAKE2b block size in bytes.
DIGEST_SIZE
DIGEST_SIZE :: BLAKE2B_SIZESourceDIGEST_SIZE is the BLAKE2b digest size in bytes.
Procedures
6clone
clone :: proc(ctx: ^Context, other: ^Context)Sourceclone clones the Context other into ctx.
final
final :: proc(ctx: ^Context, hash: []u8, finalize_clone: bool)Sourcefinal 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
init :: proc(ctx: ^Context, digest_size = DIGEST_SIZE)Sourceinit initializes a Context with the default BLAKE2b config.
init_mac
init_mac :: proc(ctx: ^Context, key: []u8, digest_size = DIGEST_SIZE)Sourceinit_mac initializes a Context with a user provided key.
reset
reset :: proc(ctx: ^Context)Sourcereset sanitizes the Context. The Context must be re-initialized to be used again.
update
update :: proc(ctx: ^Context, data: []u8)Sourceupdate adds more data to the Context.