KECCAK

Template API SHA-3/SHAKE implementation using the Keccak[1600] function.

Supports SHA-3-224, SHA-3-256, SHA-3-384, SHA-3-512, SHAKE-128, and SHAKE-256. It is recommended to use the SHA3_224, SHA3_256, SHA3_384, SHA3_512, SHAKE128, and SHAKE256 aliases.

Members

Functions

finish
ubyte[digestSizeBytes] finish()

Returns the finished hash. This also clears part of the state, leaving just the final digest.

put
void put(const(ubyte)[] input)

Feed the algorithm with data Also implements the std.range.primitives.isOutputRange interface for ubyte and const(ubyte)[].

start
void start()

Initiates the structure. Begins the SHA-3/SHAKE operation. This is better used when restarting the operation (e.g., for a file).

Manifest constants

blockSize
enum blockSize;

Sponge rate in bits

Unions

__anonymous
union __anonymous
Undocumented in source.

Parameters

digestSize

Digest size in bits

shake

Set to true for SHAKE; Otherwise false for SHA-3

Meta