HashUtil.pm: reverse order of hmac_sha1 arguments
commit6e1ab8f451bfee29f38e3dbab1fd52a4423748f3
authorKyle J. McKay <mackyle@gmail.com>
Thu, 25 Feb 2021 01:04:26 +0000 (24 18:04 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 25 Feb 2021 01:04:26 +0000 (24 18:04 -0700)
treea2d91d456bae6610780952315f5c20fecc64d83e
parent5f9a86dd452ee2d9d9c3695c53acb756f05422fe
HashUtil.pm: reverse order of hmac_sha1 arguments

Change the order of the arguments passed to HashUtil::hmac_sha1
to be "text" then "key" instead of "key" then "text".

Originally the hmac_sha1 provided by Girocco::HashUtil used the
sane order of "key" then "text" as that's the order they are
mentioned in RFC 2104.  The @#%^^@* Digest::SHA module, on the
other hand (which provides both hmac_sha1 and hmac_sha256), for
some inscrutable reason uses the order of "text" then "key"!

In an effort to avoid needless confusion, make the HashUtil
implementation of hmac_sha1 take the arguments in exactly the
same order as the Digest::SHA module's function of the same
name.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Girocco/HashUtil.pm
Girocco/Notify.pm
Girocco/TimedToken.pm