node/lib/internal/crypto
Tobias Nießen 254a03b2eb crypto: unify validation of checkPrime checks
Previously, the JS layer would validate that the value of the 'checks'
option was an unsigned 32-bit integer, otherwise throwing an appropriate
error but with a slightly misleading error message. Then the C++ layer
would validate that the value was an unsigned 31-bit integer, otherwise
throwing an appropriate error, but with a different (and even less
helpful) error message.

Instead, make the JS layer aware of the 31-bit restriction so that no
validation in C++ is necessary and so that the error message always
matches the exact requirement.

PR-URL: https://github.com/nodejs/node/pull/47165
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2023-04-07 08:40:35 -03:00
..
aes.js crypto: handle more webcrypto errors with OperationError 2022-11-10 09:45:36 -03:00
certificate.js
cfrg.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
cipher.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
diffiehellman.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
ec.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
hash.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
hashnames.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
hkdf.js crypto: remove webcrypto HKDF and PBKDF2 default-applied lengths 2022-10-12 18:38:33 +00:00
keygen.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
keys.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
mac.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
pbkdf2.js crypto: remove webcrypto HKDF and PBKDF2 default-applied lengths 2022-10-12 18:38:33 +00:00
random.js crypto: unify validation of checkPrime checks 2023-04-07 08:40:35 -03:00
rsa.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
scrypt.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
sig.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
util.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
webcrypto.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00
x509.js lib: enforce use of trailing commas 2023-03-14 07:54:16 +01:00