Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto: unify validation of checkPrime checks #47165

Commits on Mar 20, 2023

  1. 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.
    tniessen committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    e2a709b View commit details
    Browse the repository at this point in the history