fn TurboShake(comptime security_level: u11, comptime delim: ?u7) type
[src]
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
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,
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 (usesqueeze
for that purpose instead).fn hash(bytes: []const u8, out: []u8, options: Options) void
Hash a slice of bytes.
out
can be any length.
Values
Writer | undefined | |
block_length | undefined | The block length, or rate, in bytes. |
digest_length | type | The recommended output length, in bytes. |