auth0 / node-jwa

JSON Web Algorithms
http://tools.ietf.org/id/draft-ietf-jose-json-web-algorithms-08.html
MIT License
98 stars 42 forks source link

lowercase sha #4

Closed jepezi closed 9 years ago

jepezi commented 9 years ago

I got error SHA256 is not supported (we accept pull requests) when verifying jwt. Dig the code and notice that crypto package has this exports exports.sha256 = require('./sha256')(Buffer, Hash)

This PR just lowercases the first argument to 'sha' + bits for createHmac method in createHmacSigner function.

omsmith commented 9 years ago

I think create-hmac and create-hash should be accepting the uppercase alg names, but seems good to me on this end to get it working

omsmith commented 9 years ago

Published in 1.0.2

jepezi commented 9 years ago

Cool! Thanks.