fidsoft / crypto-js

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

Invalid SHA256 file hash #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download file 
http://download.aptana.com/studio3/standalone/3.0.6/win/Aptana_Studio_3_Setup_3.
0.6.exe
2. Calculate SHA256 checksum in Firefox

What is the expected output? What do you see instead?
expected:
33511286209c73e490d558cbfdfbba2caac93632fe58217d3d343aa5fb0ee8b4

result:
d1cdbe54d3319330bb1a921042c696dad794e19009c05d08b7b55518f90b4ed8

What version of the product are you using? On what operating system?
Firefox 8 (Windows 7 x64)

How to fix:

SHA256 function:

change line:
a = t1 + t2;

to:
a = (t1 + t2) >>>0;

Original issue reported on code.google.com by i...@aniskovets.com on 9 Nov 2011 at 6:28

GoogleCodeExporter commented 8 years ago
Hi Ilya,

Could you post how you're using CryptoJS to checksum the file? I'd like to add 
it to our test suite.

Original comment by Jeff.Mott.OR on 9 Nov 2011 at 7:49

GoogleCodeExporter commented 8 years ago
hi,

I use the File API (http://www.w3.org/TR/FileAPI/), you can find it here: 
http://www.md5file.com/calculator/

This is my project, which calculates the MD5, SHA1, SHA256 hashes based on your 
library.

I have already applied a patch to fix the problem there.

Original comment by i...@aniskovets.com on 9 Nov 2011 at 8:09

GoogleCodeExporter commented 8 years ago

Original comment by Jeff.Mott.OR on 8 Jan 2012 at 12:39