Skip to content

Commit

Permalink
reverted bcrypt.js changes
Browse files Browse the repository at this point in the history
  • Loading branch information
laijonathan committed Oct 4, 2022
1 parent 4c99e9e commit fd00ae0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bcrypt.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,10 @@ module.exports.genSalt = function genSalt(rounds, minor, cb) {
/// @param {String} salt the salt to use when hashing
/// @return {String} hash
module.exports.hashSync = function hashSync(data, salt) {

if (data == null || salt == null) {
throw new Error('data and salt arguments required');
}

if (salt === '') {
throw new Error('Salt cannot be empty');
}

if (typeof data !== 'string' || (typeof salt !== 'string' && typeof salt !== 'number')) {
throw new Error('data must be a string and salt must either be a salt string or a number of rounds');
}
Expand Down

0 comments on commit fd00ae0

Please sign in to comment.