core/crypto/tuplehash
tuplehash
Types
1Procedures
7clone
clone :: proc(ctx: ^Context, other: ^Context)Sourceclone clones the Context other into ctx.
final
final :: proc(ctx: ^Context, hash: []u8, finalize_clone: bool)Sourcefinal 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_128
init_128 :: proc(ctx: ^Context, domain_sep: []u8)Sourceinit_128 initializes a Context for TupleHash128 or TupleHashXOF128.
init_256
init_256 :: proc(ctx: ^Context, domain_sep: []u8)Sourceinit_256 initializes a Context for TupleHash256 or TupleHashXOF256.
read
read :: proc(ctx: ^Context, dst: []u8)Sourceread 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)Sourcereset sanitizes the Context. The Context must be re-initialized to be used again.
write_element
write_element :: proc(ctx: ^Context, data: []u8)Sourcewrite_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.