Skip to content

Commit

Permalink
Change default hashing algorithm back to sha1 for backward compatibility
Browse files Browse the repository at this point in the history
saintedlama committed Jun 23, 2015

Verified

This commit was signed with the committer’s verified signature.
frapell Franco Pellegrini
1 parent f2eb864 commit 86a784a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/passport-local-mongoose.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ module.exports = function(schema, options) {
options.iterations = options.iterations || 25000;
options.keylen = options.keylen || 512;
options.encoding = options.encoding || 'hex';
options.algorithm = options.algorithm || 'sha256';
options.algorithm = options.algorithm || 'sha1'; // To get a list of supported hashes use crypto.getHashes()
options.passwordValidator = options.passwordValidator || function(password, cb) { cb(null); };

// Populate field names with defaults if not set

0 comments on commit 86a784a

Please sign in to comment.