orneryhippo / smhasher

Automatically exported from code.google.com/p/smhasher
0 stars 0 forks source link

SHA1 Sanity does not agree with Node.js SHA1. #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Perhaps a bug in my code. I'm not able to create a sanity test that will 
generate the SHA1 result from the SHA1 in SMHasher using the sha1 implemented 
by Node.js. I'll create a test, but offhand I'm wondering if you're aware of 
any discrepancies between your SHA1 and the OpenSSL SHA1?

Original issue reported on code.google.com by a...@prettyrobots.com on 16 Aug 2013 at 3:47

GoogleCodeExporter commented 9 years ago
Here is a commit message with notes:

https://github.com/bigeasy/hash/commit/2f8efa88e0b006a6fb63c41bc16f5490c7b1aaa3

Here is the test.

https://github.com/bigeasy/hash/blob/master/proof.js
https://github.com/bigeasy/hash/blob/master/hash.stream/t/sha1.t.js

Original comment by a...@prettyrobots.com on 16 Aug 2013 at 4:04

GoogleCodeExporter commented 9 years ago
Also worth noting. If I limit both my test and the VerificationTest test to the 
first 20 bytes, they are in agreement.

Original comment by a...@prettyrobots.com on 16 Aug 2013 at 4:39