dd86k / blake2-d

Pure D implementation of BLAKE2 + DUB package
https://code.dlang.org/packages/blake2-d
Boost Software License 1.0
7 stars 1 forks source link

Add key() function to WrapperDigest #6

Closed dd86k closed 1 year ago

dd86k commented 1 year ago

The Digest API does not support keyed algorithms. Thankfully, WrapperDigest (OOP API) is a class template and I hope to inherit it to add a key function already found in the structure template (Template API).

Key can still be given to template structure anyway when initiating the class template.

This adds the key function to the Digest OOP API.

Concept

class WrapperDigestKeyed(T) if (isDigest!T) : WrapperDigest!T
{
    void key(ubyte[] input)
    {
        _digest.key(input);
    }
}
dd86k commented 1 year ago

Released in v0.3.0