Skip to content

Commit 18db451

Browse files
tniessentargos
authored andcommitted
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 <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent aaee981 commit 18db451

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/crypto/pbkdf2.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ function check(password, salt, iterations, keylen, digest) {
6666

6767
password = getArrayBufferView(password, 'password');
6868
salt = getArrayBufferView(salt, 'salt');
69-
validateUint32(iterations, 'iterations', 0);
70-
validateUint32(keylen, 'keylen', 0);
69+
validateUint32(iterations, 'iterations');
70+
validateUint32(keylen, 'keylen');
7171

7272
return { password, salt, iterations, keylen, digest };
7373
}

0 commit comments

Comments
 (0)