package core:crypto/tuplehash



    package tuplehash implements the TupleHash and TupleHashXOF algorithms.



    Types (1)
    Constants (0)

    This section is empty.

    Variables (0)

    This section is empty.

    Procedure Groups (0)

    This section is empty.


    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


    This section is empty.


    This section is empty.


    clone ¶

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

    clone clones the Context other into ctx.

    final ¶

    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.

    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 :: proc(ctx: ^Context, domain_sep: []u8) {…}

    init_128 initializes a Context for TupleHash128 or TupleHashXOF128.

    init_256 ¶

    init_256 :: proc(ctx: ^Context, domain_sep: []u8) {…}

    init_256 initializes a Context for TupleHash256 or TupleHashXOF256.

    read ¶

    read :: proc(ctx: ^Context, dst: []u8) {…}

    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 :: proc(ctx: ^Context, data: []u8) {…}

    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-04 (vendor "odin") Windows_amd64 @ 2024-04-26 21:08:58.360923300 +0000 UTC