You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Create a text file containing aÿþa
2. Convert it to AINSII/UTF8/UTF8-NOBOM/UTF16/.....
3. Check the hash returned and compare with a Checksum application.
What is the expected output? What do you see instead?
The CryptoJS lib force conversion to UTF8 on the input, it will return wrong
hash...
What version of the product are you using? On what operating system?
Firefox 31 / 3.1.2
Please provide any additional information below.
How to fix it ? Simply don't use UTF8 encode on the input because you really
don't need it, you would need UTF8 encode if you wanted to "SHOW" the content,
but you really don't need to UTF8 encode the file to get a hash of it.... Or
you will get a very wrong hash.
I attached a screenshot showing how to fix it for SHA3.js file, however, you
will have the same issues in almost all if not all the others hashs
implementation. I got the same issue with SHA-256.
For SHA3 : q to e
For SHA256 : l to k
Easy to realize if you look at my screenshot.
Note that is a "temp-fix", you may need the UTF8 somewhere else in the file for
w/e reason.
Original issue reported on code.google.com by [email protected] on 3 Aug 2014 at 2:52
Original issue reported on code.google.com by
[email protected]
on 3 Aug 2014 at 2:52Attachments:
The text was updated successfully, but these errors were encountered: