ddn.api.crypto.hash

Hash function API.

iface Hash

Types 1

interfaceHash

Interface for cryptographic hash functions.

Methods
Hash update(const(ubyte)[] input)Updates the hash with the given input data. Params: input = The data to update with. Returns: The Hash instance itself for method chaining.
ubyte[] finish()Finalizes the hash computation and returns the digest. Resets the hash function to its initial state. Returns: The message digest.
void reset()Resets the hash function to its initial state.
size_t blockSize() @property const @safe pure nothrow @nogcReturns: The internal block size of the hash function in bytes.
size_t size() @property const @safe pure nothrow @nogcReturns: The size of the digest in bytes.
ubyte[] digest(const(ubyte)[] data)One-shot convenience method: resets, hashes the input, and returns the digest.