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 <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent aaee981 commit 18db451

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/internal/crypto/pbkdf2.js‎

Lines changed: 2 additions & 2 deletions
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)