Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 3 comments
Open

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

GoogleCodeExporter opened this issue Mar 16, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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

@gchatelet
Copy link

I - too - couldn't match SHA1 sanity number (0xF9376EA7) while trying to sanity check D's digest API. The other sanity check do work though (MD5, CRC32, and MurmurHash).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants