invalid SHA256 hash
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
What steps will reproduce the problem?
1. Do this: Crypto.SHA256('\xff')
What is the expected output? What do you see instead?
The hash should be (tested in Python):
a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb89
But is:
ea47fa96cf6d727d3068913da9193fef44aec4ee2c5972e9ac50cf7d637a56cf
What version of the product are you using? On what operating system?
I am using Crypto-js version 2.5.2. I tried the fix in issue #16, but it
doesn't work (same output).
Please provide any additional information below.
The other hash is one using Python: hashlib.sha256('\xff').hexdigest()
Original issue reported on code.google.com by aykevanl...@gmail.com
on 7 Jan 2012 at 8:57
Google Code Exporter commented
Note: I use Chromium 15.0.874.106 (Developer Build 107270 Linux) Ubuntu 11.10
Original comment by aykevanl...@gmail.com
on 7 Jan 2012 at 8:58
Google Code Exporter commented
Sorry, my fault. Unicode and binary aren't the same. This works:
Crypto.SHA256(Crypto.charenc.Binary.stringToBytes('\xff'))
Original comment by aykevanl...@gmail.com
on 7 Jan 2012 at 9:09
Google Code Exporter commented
Original comment by Jeff.Mott.OR
on 7 Jan 2012 at 11:07
- Changed state: Invalid