diff options
author | Tobias Nießen <tniessen@tnie.de> | 2019-11-21 11:46:31 -0400 |
---|---|---|
committer | Tobias Nießen <tniessen@tnie.de> | 2019-11-21 22:52:27 -0400 |
commit | 64ee64d3afc837350ee39058cef9179e92f3554c (patch) | |
tree | b1b594c2a7574369f2e3380a2ac51c45e4d09462 /lib/internal/crypto | |
parent | b8f8f0500213e7347d92465dd5120f632c05e253 (diff) | |
download | android-node-v8-64ee64d3afc837350ee39058cef9179e92f3554c.tar.gz android-node-v8-64ee64d3afc837350ee39058cef9179e92f3554c.tar.bz2 android-node-v8-64ee64d3afc837350ee39058cef9179e92f3554c.zip |
crypto: remove redundant validateUint32 argument
The third parameter should be a boolean indicating whether the number
must be positive. Passing zero works, but is unnecessary, misleading
and inconsistent with other uses of the same function.
PR-URL: https://github.com/nodejs/node/pull/30579
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'lib/internal/crypto')
-rw-r--r-- | lib/internal/crypto/pbkdf2.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/crypto/pbkdf2.js b/lib/internal/crypto/pbkdf2.js index 1c2288b65f..20f6f68225 100644 --- a/lib/internal/crypto/pbkdf2.js +++ b/lib/internal/crypto/pbkdf2.js @@ -66,8 +66,8 @@ function check(password, salt, iterations, keylen, digest) { password = getArrayBufferView(password, 'password'); salt = getArrayBufferView(salt, 'salt'); - validateUint32(iterations, 'iterations', 0); - validateUint32(keylen, 'keylen', 0); + validateUint32(iterations, 'iterations'); + validateUint32(keylen, 'keylen'); return { password, salt, iterations, keylen, digest }; } |