diff --git a/examples/auth/pass.js b/examples/auth/pass.js index fefb25b66a..d090b13c0b 100644 --- a/examples/auth/pass.js +++ b/examples/auth/pass.js @@ -31,7 +31,7 @@ var iterations = 12000; exports.hash = function (pwd, salt, fn) { if (3 == arguments.length) { - crypto.pbkdf2(pwd, salt, iterations, len, function(err, hash){ + crypto.pbkdf2(pwd, salt, iterations, len, 'sha256', function(err, hash){ fn(err, hash.toString('base64')); }); } else { @@ -39,7 +39,7 @@ exports.hash = function (pwd, salt, fn) { crypto.randomBytes(len, function(err, salt){ if (err) return fn(err); salt = salt.toString('base64'); - crypto.pbkdf2(pwd, salt, iterations, len, function(err, hash){ + crypto.pbkdf2(pwd, salt, iterations, len, 'sha256', function(err, hash){ if (err) return fn(err); fn(null, salt, hash.toString('base64')); });