`SHA3` hash algorithm family. The SHAKE XOF can be found in crypto/shake. While discouraged if the pre-standardization Keccak algorithm is required, it can be found in crypto/legacy/keccak. See: - [[ https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.202.pdf ]]

Collection Info

View Source
Collection
core
Path
crypto/sha3
Entries
17

Source Files

Constants

8

BLOCK_SIZE_224 #

Source
BLOCK_SIZE_224 :: _sha3.RATE_224

BLOCK_SIZE_224 is the SHA3-224 block size in bytes.

BLOCK_SIZE_256 #

Source
BLOCK_SIZE_256 :: _sha3.RATE_256

BLOCK_SIZE_256 is the SHA3-256 block size in bytes.

BLOCK_SIZE_384 #

Source
BLOCK_SIZE_384 :: _sha3.RATE_384

BLOCK_SIZE_384 is the SHA3-384 block size in bytes.

BLOCK_SIZE_512 #

Source
BLOCK_SIZE_512 :: _sha3.RATE_512

BLOCK_SIZE_512 is the SHA3-512 block size in bytes.

DIGEST_SIZE_224 #

Source
DIGEST_SIZE_224 :: 28

DIGEST_SIZE_224 is the SHA3-224 digest size.

DIGEST_SIZE_256 #

Source
DIGEST_SIZE_256 :: 32

DIGEST_SIZE_256 is the SHA3-256 digest size.

DIGEST_SIZE_384 #

Source
DIGEST_SIZE_384 :: 48

DIGEST_SIZE_384 is the SHA3-384 digest size.

DIGEST_SIZE_512 #

Source
DIGEST_SIZE_512 :: 64

DIGEST_SIZE_512 is the SHA3-512 digest size.

Types

1

Procedures

8

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.