zorba-processor / zorba

Zorba - the NoSQL processor
http://zorba.io
Apache License 2.0
42 stars 16 forks source link

HMAC not working as expected #14

Open benoj opened 6 years ago

benoj commented 6 years ago

hmac:compute("The quick brown fox jumps over the lazy dog", "key" ,"SHA256")

produces: 97yD9DBThCSxMpjmqm+xQ+9NWaFJRhdZl0edvC0aPNg= which when base64 decoded returns garbage rather than the expected f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8

Am I using this module correctly?

fs-aikito commented 5 years ago

It is just different encoding of the same underlying bits:

$ echo "97yD9DBThCSxMpjmqm+xQ+9NWaFJRhdZl0edvC0aPNg=" | base64 -d | xxd -p -c 32
f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8