-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Crypto Hmac SH256 returning incorrect values? #324
Comments
Same thing happens in https://gist.github.com/663052 |
Test 5 should use truncation. If applied, the result looks valid to me. We should fix these tests and add them to the test suite, though. |
it doesn't like binary salts at all... probably as it converts the buffer to strings before decoding it as binary. |
I'm not sure when this changed, but a retest in 0.4.9 and 0.5.0 shows these tests working in both. |
I just tried my test cases without my patch, and they still don't work. with my path, they do. |
Okay, reopening. cjc's test case fails on master, will have to check what's at fault here. |
well, just accept my pull request for it. includes test cases :) #1027 |
G'day,
I've created a test script based on RFC4231 -"Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512". Of the 7 test vectors provided, crypto.createHmac("sha256",.. appears to be returning incorrect results for 3,5,6 and 7.
http://gist.github.com/608586
The text was updated successfully, but these errors were encountered: