package core:crypto/tuplehash
Overview
package tuplehash implements the TupleHash and TupleHashXOF algorithms.
See: https://nvlpubs.nist.gov/nistpubs/specialpublications/nist.sp.800-185.pdf
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 TupleHash or TupleHashXOF instance.
Related Procedures With Parameters
Constants
This section is empty.
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.
init_128 ¶
init_128 initializes a Context for TupleHash128 or TupleHashXOF128.
init_256 ¶
init_256 initializes a Context for TupleHash256 or TupleHashXOF256.
read ¶
read reads output from the TupleHashXOF instance. There is no practical upper limit to the amount of data that can be read from TupleHashXOF. After read has been called one or more times, further calls to write_element will panic.
reset ¶
reset :: proc(ctx: ^Context) {…}
reset sanitizes the Context. The Context must be re-initialized to be used again.
write_element ¶
write_element writes a tuple element into the TupleHash or TupleHashXOF instance. This MUST not be called after any reads have been done, and any attempts to do so will panic.
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2024-12 (vendor "odin") Windows_amd64 @ 2024-12-20 21:10:45.871812300 +0000 UTC