package core:crypto/sha3
Overview
package sha3 implements the 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
Index
Types (1)
Variables (0)
This section is empty.
Procedure Groups (0)
This section is empty.
Types
Context ¶
Context :: struct { st: struct #raw_union { b: [200]u8, q: [25]u64, }, pt: int, rsiz: int, mdlen: int, dsbyte: u8, is_initialized: bool, is_finalized: bool, }
Context is a SHA3 instance.
Related Procedures With Parameters
Constants
BLOCK_SIZE_224 ¶
BLOCK_SIZE_224 :: _sha3.RATE_224
BLOCK_SIZE_224 is the SHA3-224 block size in bytes.
BLOCK_SIZE_256 ¶
BLOCK_SIZE_256 :: _sha3.RATE_256
BLOCK_SIZE_256 is the SHA3-256 block size in bytes.
BLOCK_SIZE_384 ¶
BLOCK_SIZE_384 :: _sha3.RATE_384
BLOCK_SIZE_384 is the SHA3-384 block size in bytes.
BLOCK_SIZE_512 ¶
BLOCK_SIZE_512 :: _sha3.RATE_512
BLOCK_SIZE_512 is the SHA3-512 block size in bytes.
Variables
This section is empty.
Procedures
final ¶
final finalizes the Context, writes the digest to hash, and calls reset on the Context.
Iff finalize_clone is set, final will work on a copy of the Context, which is useful for for calculating rolling digests.
reset ¶
reset :: proc(ctx: ^Context) {…}
reset sanitizes the Context. The Context must be re-initialized to be used again.
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2024-11 (vendor "odin") Windows_amd64 @ 2024-11-16 21:10:09.823106300 +0000 UTC