Conversation
| second.update(sjcl.codec.arrayBuffer.toBits(nonce.buffer)) | ||
|
|
||
| return second.digest() | ||
| return Buffer.from(sjcl.codec.arrayBuffer.fromBits(second.finalize())) |
There was a problem hiding this comment.
@goldibex I'm having trouble producing the same hashes as before, narrowed it down to the second hash differing. I'm using the undocumented sjcl toBits method (in their latest online docs anyways, our vendored version maybe differs?) as you are doing in libcrypto. Any ideas?
There was a problem hiding this comment.
Never mind, apparently node Buffer instances can share memory so you need to copy out the parts needed from the underlying ArrayBuffer. Fixed with latest commit
|
This is blocked by a secure replacement for crypto.randomBytes |
|
@jnordberg Hey, can we use https://github.com/crypto-browserify/randombytes to replace crypto.randomBytes ? Seems millions of people use it so it should be a suitable drop in replacement. |
|
That should work yeah |
Closes #9