Every key pair generator that will not take the key size handed to KeyPairGenerator.initialize(int, SecureRandom) now reports it as the InvalidParameterException the JCA specifies rather than a bare IllegalArgumentException, so a caller catching the documented type reads a refusal rather than an escaping exception, covering the thirty PQC generators whose parameter set cannot be named by a key size at all and RSA, whose refusal comes from the lightweight RSAKeyGenerationParameters and is now translated through a new SecurityExceptions.invalidParameterException keeping the message and chaining the original as the cause, with InvalidParameterException extending IllegalArgumentException so existing catches still match.
D
David Hook committed
b122590a87b4f9f9ce1ab0288d6452287cc67005
Parent: 9b1812c