I've just been comparing Node's pbkdf2 function to that from CryptoJS (
http://code.google.com/p/crypto-js/#PBKDF2). This program:

console.log('CryptoJS', Crypto.PBKDF2('foo', 'salt', {keySize: 16,
iterations: 1}).toString());

crypto.pbkdf2('foo', 'salt', 1, 16, function(error, key1) {
  console.log('Node', key1.toString('hex'));
});

Produces this output:

CryptoJS
ed3b239acbd18e722fc65598328405473245eef7492e71f67d2940f02b847e336846510e1e585f8b5c256043e45ded4ed2dc9f7ea51435befccf3192d5d2f287
Node í;#šËÑŽr/ÆU˜2„ G

Can someone explain why the outputs are different? I'm trying make
something that's portable between the server and the client, so need to
pick a library I can rely on for consistent output.

-- 
James Coglan
http://jcoglan.com
+44 (0) 7771512510

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to