fidsoft / crypto-js

Automatically exported from code.google.com/p/crypto-js
0 stars 0 forks source link

HMAC SHA1 Not passing test cases #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When using the HMAC SHA1 functions, the functions do not return the same
data as provided by the RFC2202 (http://www.faqs.org/rfcs/rfc2202.html).

Original issue reported on code.google.com by robin.du...@gmail.com on 15 Mar 2010 at 2:09

GoogleCodeExporter commented 8 years ago
Hi, Robin. Thanks for taking the time to help improve this library.

I tried to reproduce the error, but the tests attached all passed. Can you post 
code 
that reproduces the error?

Since JavaScript strings are composed of Unicode, multi-byte characters, this 
library 
converts strings to UTF-8 encoded byte arrays. If you want to hash a literal 
set of 
octets, you'll need to pass them as a byte array, as in the test cases 
attached. The 
project home page doesn't document this behavior.

Original comment by Jeff.Mott.OR on 15 Mar 2010 at 5:45

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Jeff,

You aren't going to believe this, but I had the key and message the wrong way 
around.

That'll learn me for not paying attention.

Sorry!

Original comment by robin.du...@gmail.com on 15 Mar 2010 at 8:07

GoogleCodeExporter commented 8 years ago

Original comment by Jeff.Mott.OR on 15 Mar 2010 at 9:00