I might be missing something about the rational behind the HmacImpl sealed trait (like some implicit invariant), but I'm wondering why Hkdf and HkdfExtract are not parametrized by hmac::Mac instead. This trait already provides OutputSizeUser.
This would be useful when someone has both a Digest and a Mac hardware implementation and would like to compute HKDF using that Mac hardware implementation instead of using the SimpleHmac software implementation on top of the Digest hardware implementation.
I might be missing something about the rational behind the
HmacImplsealed trait (like some implicit invariant), but I'm wondering whyHkdfandHkdfExtractare not parametrized byhmac::Macinstead. This trait already providesOutputSizeUser.This would be useful when someone has both a
Digestand aMachardware implementation and would like to compute HKDF using thatMachardware implementation instead of using theSimpleHmacsoftware implementation on top of theDigesthardware implementation.