`Keccak` hash algorithm family. During the SHA-3 standardization process, the padding scheme was changed thus Keccac and SHA-3 produce different outputs. Most users should use SHA-3 and/or SHAKE instead, however the legacy algorithm is provided for backward compatibility purposes.

Collection Info

View Source
Collection
core
Path
crypto/legacy/keccak
Entries
17

Source Files

Constants

8

BLOCK_SIZE_224 #

Source
BLOCK_SIZE_224 :: _sha3.RATE_224

BLOCK_SIZE_224 is the Keccak-224 block size in bytes.

BLOCK_SIZE_256 #

Source
BLOCK_SIZE_256 :: _sha3.RATE_256

BLOCK_SIZE_256 is the Keccak-256 block size in bytes.

BLOCK_SIZE_384 #

Source
BLOCK_SIZE_384 :: _sha3.RATE_384

BLOCK_SIZE_384 is the Keccak-384 block size in bytes.

BLOCK_SIZE_512 #

Source
BLOCK_SIZE_512 :: _sha3.RATE_512

BLOCK_SIZE_512 is the Keccak-512 block size in bytes.

DIGEST_SIZE_224 #

Source
DIGEST_SIZE_224 :: 28

DIGEST_SIZE_224 is the Keccak-224 digest size.

DIGEST_SIZE_256 #

Source
DIGEST_SIZE_256 :: 32

DIGEST_SIZE_256 is the Keccak-256 digest size.

DIGEST_SIZE_384 #

Source
DIGEST_SIZE_384 :: 48

DIGEST_SIZE_384 is the Keccak-384 digest size.

DIGEST_SIZE_512 #

Source
DIGEST_SIZE_512 :: 64

DIGEST_SIZE_512 is the Keccak-512 digest size.

Types

1

Procedures

8

clone #

Source
clone :: proc "contextless" (ctx, other: ^Context) {…}

clone clones the Context other into ctx.

final #

Source
final :: proc "contextless" (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.

init_224 #

Source
init_224 :: proc "contextless" (ctx: ^Context) {…}

init_224 initializes a Context for Keccak-224.

init_256 #

Source
init_256 :: proc "contextless" (ctx: ^Context) {…}

init_256 initializes a Context for Keccak-256.

init_384 #

Source
init_384 :: proc "contextless" (ctx: ^Context) {…}

init_384 initializes a Context for Keccak-384.

init_512 #

Source
init_512 :: proc "contextless" (ctx: ^Context) {…}

init_512 initializes a Context for Keccak-512.

reset #

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

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

update #

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

update adds more data to the Context.