BLAKE2

BLAKE2 structure template.

It is recommended to use the BLAKE2p512 and BLAKE2s256 aliases. However, if you wish to use a custom digest size, this is the structure to use.

Example definitions for BLAKE2s-160:

alias BLAKE2s160 = BLAKE2!(BLAKE2Variant.s, 160);
auto blake2s160_Of(T...)(T data) { return digest!(BLAKE2s160, T)(data); }
public alias BLAKE2s160Digest = WrapperDigest!BLAKE2s160;

Members

Aliases

IV
alias IV = B2B_IV
Undocumented in source.
IV
alias IV = B2S_IV
Undocumented in source.
inner_t
alias inner_t = ulong
Undocumented in source.
inner_t
alias inner_t = uint
Undocumented in source.

Functions

finish
ubyte[digestSizeBytes] finish()

Returns the finished hash.

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()

Initiate or reset the state of the structure.

Manifest constants

blockSize
enum blockSize;

Digest size in bits

Variables

key
ubyte[32] key;
Undocumented in source.

Parameters

var

BLAKE2 hash variation.

digestSize

Digest size in bits.

Meta