Skip to content
Browse files

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: #30579
Reviewed-By: Colin Ihrig <>
Reviewed-By: Michael Dawson <>
Reviewed-By: Luigi Pinca <>
  • Loading branch information
tniessen authored and MylesBorins committed Nov 21, 2019
1 parent 0d26263 commit c1cb639e846199b3b233289672d5c8e1b634d37c
Showing with 2 additions and 2 deletions.
  1. +2 −2 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 };

0 comments on commit c1cb639

Please sign in to comment.
You can’t perform that action at this time.