`SM3` hash algorithm. See: - [[ https://datatracker.ietf.org/doc/html/draft-sca-cfrg-sm3-02 ]]

Collection Info

View Source
Collection
core
Path
crypto/sm3
Entries
8

Source Files

Constants

2

BLOCK_SIZE #

Source
BLOCK_SIZE :: 64

BLOCK_SIZE is the SM3 block size in bytes.

DIGEST_SIZE #

Source
DIGEST_SIZE :: 32

DIGEST_SIZE is the SM3 digest size in bytes.

Types

1

Procedures

5

final #

Source
final :: proc(ctx: ^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.

reset #

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

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