package core:crypto/turboshake

⌘K
Ctrl+K
or
/

    Overview

    TurboSHAKE XOF algorithm family.

    The SHA3 hash algorithm can be found in the crypto/sha3.

    See:

    Index

    Types (1)
    Constants (0)

    This section is empty.

    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,
    	keccak_round_start: i32,
    	// Round at which keccak_permute starts
    	dsbyte:             u8,
    	is_initialized:     bool,
    	is_finalized:       bool,
    }
     

    Context is a TurboSHAKE128 or TurboSHAKE256 instance.

    Related Procedures With Parameters

    Constants

    This section is empty.

    Variables

    This section is empty.

    Procedures

    clone ¶

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

    clone clones the Context other into ctx.

    init_128 ¶

    init_128 :: proc(ctx: ^Context, d: u8 = _sha3.DS_TURBOSHAKE_DEFAULT) {…}
     

    init_128 initializes a Context for TurboSHAKE128. Uses the default domain separation byte of 0x1f, unless one is supplied.

    init_256 ¶

    init_256 :: proc(ctx: ^Context, d: u8 = _sha3.DS_TURBOSHAKE_DEFAULT) {…}
     

    init_256 initializes a Context for TurboSHAKE256. Uses the default domain separation byte of 0x1f, unless one is supplied.

    read ¶

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

    read reads output from the TurboSHAKE instance. There is no practical upper limit to the amount of data that can be read from TurboSHAKE. After read has been called one or more times, further calls to write will panic.

    reset ¶

    reset :: proc(ctx: ^Context) {…}
     

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

    write ¶

    write :: proc(ctx: ^Context, data: []u8) {…}
     

    write writes more data into the TurboSHAKE instance. This MUST not be called after any reads have been done, and attempts to do so will panic.

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2026-11 (vendor "odin") Windows_amd64 @ 2026-11-28 21:05:09.772358800 +0000 UTC