Re: [PATCH 2/2] hmac-*: refactor to remove repetitive code

2018-09-30 Thread Pádraig Brady
On 30/09/18 11:22, Bruno Haible wrote: > Hi Pádraig, > > With this patch, I see a small regression: > >> #include >> - >> -#include "hmac.h" > There is no verification any more that hmac.h is self-contained. > > As mentioned just yesterday, the best practice is to #include the > specification

Re: [PATCH 2/2] hmac-*: refactor to remove repetitive code

2018-09-30 Thread Bruno Haible
Hi Pádraig, With this patch, I see a small regression: > #include > - > -#include "hmac.h" and > --- a/tests/test-hmac-sha1.c > +++ b/tests/test-hmac-sha1.c > @@ -17,43 +17,51 @@ > /* Written by Simon Josefsson. */ > > #include > +#include > +#include > +#include > > #include "hma

[PATCH 2/2] hmac-*: refactor to remove repetitive code

2018-09-29 Thread Pádraig Brady
A net removal of 240 lines. * lib/hmac.c: A new parameterized single implementation. * lib/hmac-md5.c: Define parameters and include implementation. * lib/hmac-sha1.c: Likewise. * lib/hmac-sha256.c: Likewise. * lib/hmac-sha512.c: Likewise. * modules/crypto/hmac-md5: Reference the new implementatio