fn TurboShake(comptime security_level: u11, comptime delim: ?u7) type

The TurboSHAKE extendable output hash function. It is based on the same permutation as SHA3 and SHAKE, but which much higher performance. The delimiter is 0x1f by default, but can be changed for context-separation. https://eprint.iacr.org/2023/342

Parameters

security_level: u11,
delim: ?u7,

Fields

st: KeccakState(1600, security_level * 2, delim, rounds) = .{ },
buf: [KeccakState(1600, security_level * 2, delim, rounds).rate]u8 = undefined,
offset: usize = 0,
padded: bool = false,

Namespaces

Functions

fn final(self: *Self, out: []u8) void

Return the hash of the absorbed bytes. out can be of any length, but the func…

Return the hash of the absorbed bytes. out can be of any length, but the function must not be called multiple times (use squeeze for that purpose instead).

fn hash(bytes: []const u8, out: []u8, options: Options) void

Hash a slice of bytes. out can be any length.

fn init(options: Options) Self

Initialize a SHAKE extensible hash function.

fn squeeze(self: *Self, out_: []u8) void

Squeeze a slice of bytes from the state. out can be any length, and the funct…

Squeeze a slice of bytes from the state. out can be any length, and the function can be called multiple times.

fn update(self: *Self, bytes: []const u8) void

Absorb a slice of bytes into the state.

fn writer(self: *Self) Writer

No documentation provided.

Values

Writer
undefined
block_length
undefined

The block length, or rate, in bytes.

digest_length
type

The recommended output length, in bytes.

Error Sets