Skip to content

Commit

Permalink
fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
laijonathan committed Oct 3, 2022
1 parent ee9117c commit 4c99e9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bcrypt.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,14 @@ 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
3 changes: 2 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
}
}],
['OS=="zos" and NODE_VERSION < 16',{
['OS=="zos" and NODE_VERSION <= 16',{
'cflags': [
'-qascii',
],
'defines': ["NAPI_DISABLE_CPP_EXCEPTIONS"],
}],
],
},
Expand Down

0 comments on commit 4c99e9e

Please sign in to comment.