[erlang-patches] Crypto documentation enhancements for HMAC types
Sverker Eriksson
sverker.eriksson@REDACTED
Thu Sep 27 11:14:23 CEST 2012
Daniel White wrote:
> On Thu, Sep 27, 2012 at 1:51 AM, Sverker Eriksson
> <sverker.eriksson@REDACTED> 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.
>
>
I guess I didn't set a very good example, neglecting tests for the new
hash_* functions.
However, test case hmac_rfc4231 contains tests for all flavors of hmac
functions (even the undocumeneted). You could add calls to your new hmac
functions there and check that you get the same result.
> Is an approach like this sensible? And is this more suited to master
> rather than maint?
>
>
Yes, as new functionality this is more suitable for master.
/Sverker
More information about the erlang-patches
mailing list