-
Notifications
You must be signed in to change notification settings - Fork 34
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
incorrect hash in android 4.3.1 and lower #8
Comments
idk if it's me or not ... |
what the actual code your using to hash the value, when I do crypto.createHash('sha256').update('synchronous write').digest('hex'); I get 1e0a06bb7cb5399c5389c14ff182b748834f9aedbcfd5bb467e12bdde24a5370 |
ooops sorry, yea, was trying difference message, updated original post now. the odd (or maybe not) thing is that the result is always very similar (when I manually compare I can barely see the difference). using |
yeah looks to be an issue with the sufix of the hash |
(in the browser createHash and crypto.createHash are actually the same) |
I hopefully will be able to get to this this weekend |
1e0a06bb7cb5399c5389c14ff182b7 00 834f9a 00 bcfd5b 00 67e12bdde24a53 00
1e0a06bb7cb5399c5389c14ff182b7 48 834f9a ed bcfd5b b4 67e12bdde24a53 70 1e0a06 bb 7cb539 9c 5389c1 4f f182b7 00 834f9a 00 bcfd5b 00 67e12b dd e24a53 00
1e0a06 bb 7cb539 9c 5389c1 4f f182b7 48 834f9a ed bcfd5b b4 67e12b dd e24a53 70 It isn't just the suffix, seems to be on the 4th byte (though, not consistently). |
ok able to confirm that the issue is not present on android 4.4 (which as it turns out is the oldest devise I own) installing the emulator now |
so that being said I am giving another go at setting up browser tests for the whole module family (crypto-browserify/crypto-browserify#139) which should catch this. |
@rubensayshi do you have a more in depth reproduction environment? Can't reproduce either. |
aha! reproduced it! https://api.travis-ci.org/jobs/83552020/log.txt?deansi=true |
I was testing on |
it seems to be a issue with the browserify buffer implementation as I've been able to write a failing test there. |
See feross/buffer#81, closing in favour of that |
when using
createHash('sha256')
I'm getting to hash'synchronous write'
I'm getting1e0a06bb7cb5399c5389c14ff182b700834f9a00bcfd5b0067e12bdde24a5300
instead of1e0a06bb7cb5399c5389c14ff182b748834f9aedbcfd5bb467e12bdde24a5370
.using
crypto-js
I'm getting the correct hash.I'm using this repo to test it with inside an Android 4.3.1 emulator (Nexus 4 Intel Atom x64):
https://github.com/rubensayshi/browserify-cryptojs-android
using node v0.10 or v0.12 to browserify and run cordova doesn't make a difference
The text was updated successfully, but these errors were encountered: