scrypt results are not deterministic across different installation methods
wrboyce opened this issue · comments
Will Boyce commented
I switched from including this repo as a submodule and including browser/triplesec.js
to using browserify in my project and things stopped working.
Upon further investigation it seems the output of to_utf8
differs across both installations, despite both claiming to be v3.0.15
> var git, npm;
> triplesec.scrypt({
key: triplesec.WordArray.from_utf8('password'),
salt: triplesec.WordArray.from_utf8('salt'),
dkLen: 1024}, (k) => git=k);
> triplesec_npm.scrypt({
key: triplesec_npm.WordArray.from_utf8('password'),
salt: triplesec_npm.WordArray.from_utf8('salt'),
dkLen: 1024}, (k) => npm=k);
> git.to_hex() == npm.to_hex()
true
> git.to_utf8() == npm.to_utf8()
false