Open dd86k opened 2 years ago
I think I could do a void key(scope const(ubyte)[] data...)
function that performs a "second stage" initiation.
Got key stuff in but that's not hmac so keeping this open.
For the HMAC templates to work, the key needs to be initiated at compile-time. The issue is, while the default key is the IV, they are of different types in the s (uint) and b (ulong) variants.
While the Digest API uses std.digest.hmac.HMAC for HMAC, which adds a secret hashed key using the template API, the way BLAKE2 does is just... Weird.
At initiation:
Which is simply not possible with the HMAC structure template. Unless there's a hack I don't know of.