Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
reverted bcrypt.js changes
  • Loading branch information
laijonathan committed Oct 4, 2022
commit fd00ae0819e654e806565b60b33f06d82fcdb2b3
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