mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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>
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user