[erlang-patches] Crypto documentation enhancements for HMAC types

Daniel White <>
Wed Sep 26 18:49:12 CEST 2012

On Thu, Sep 27, 2012 at 1:51 AM, Sverker Eriksson
<> wrote:
> Daniel White wrote:
>> I'm less sure about whether the second patch as it adds an entry for
>> each sha*_mac function.  Is there a desire to keep both types of
>> interface standard in the long run?  Or is the more general hmac_init
>> suitable enough?
> I think I would prefer a generic hmac(Type, Key, Data) similar to
> hash(Type;Data) that was added in R15B02.
> /Sverker, Erlang/OTP

With that in mind, I've pushed a new branch, throwing away the
documentation of the sha*_mac functions.

This includes a generic interface to the hmac functions as the second
patch.  What is potentially missing are tests, as I wasn't sure how
best to approach them in this context and hash/2 doesn't have any
tests itself.  I suspect some minimal sanity tests applied to both
would be worthwhile, but only if necessary.

Is an approach like this sensible?  And is this more suited to master
rather than maint?

Patch info:

git fetch git://github.com/danielwhite/otp.git crypto-hmac-enhancements.patch


Daniel White

More information about the erlang-patches mailing list