Closed GoogleCodeExporter closed 8 years ago
In the PBKDF2 config, you'll need to pass CryptoJS.algo.SHA256 rather than
CryptoJS.SHA256. The former is the actual "class", while the latter is a
convenience/shortcut function. Admittedly the example doesn't make this clear.
I'll update that when I can. Also, in the next major revision, there will no
longer be a distinction between the class and the shortcut function.
Original comment by Jeff.Mott.OR
on 25 Mar 2013 at 8:26
Original comment by Jeff.Mott.OR
on 26 Mar 2013 at 9:24
I have this issue when using the correct hasher parameter suggested above.
CryptoJS.PBKDF2(password, salt, { hasher:CryptoJS.algo.SHA256 });
Here is the chrome console error output:
Uncaught TypeError: Object [object Array] has no method 'clamp' pbkdf2.js:16
g.algo.HMAC.g.lib.Base.extend.init pbkdf2.js:16
c.hasOwnProperty.c.init aes.js:7
l.Base.create aes.js:7
j.PBKDF2.e.extend.compute pbkdf2.js:18
g.PBKDF2 pbkdf2.js:19
The same error also arises using CryptoJS.PBKDF2(password, salt, {
hasher:CryptoJS.algo.SHA1 }).
Original comment by KevinRausch
on 28 May 2013 at 12:56
Where are the password and salt values coming from?
Original comment by Jeff.Mott.OR
on 28 May 2013 at 1:04
The password and salt were wrong. I'm migrating from SJCL to CryptoJS and I was
stupidly using their string parser. Issue fixed. Thanks for your time.
Original comment by KevinRausch
on 28 May 2013 at 1:20
Original issue reported on code.google.com by
hoeew...@gmail.com
on 25 Mar 2013 at 7:46