Closed TotalTechGeek closed 6 years ago
You're in good company though: ricmoo's scrypt-js also has the same bug.
You're right, thanks! The error is here: https://github.com/dchest/scrypt-async-js/blob/master/scrypt-async.js#L157 SHA256(password)
expects password to be an Array
, but if password is Uint8Array
, it obviously won't work. I'll wait for you PR.
Steps to reproduce -
1) Create a key greater than length 64. 2) Use a structure that doesn't support .push (like Buffer), ex.
3) run scrypt
The short term fix is to convert to a structure that does support the .push operation.
I will be submitting a PR