On Tue, 23 Apr 2024 20:42:51 GMT, Kevin Driver <kdri...@openjdk.org> wrote:
> Introduce an API for Key Derivation Functions (KDFs), which are cryptographic > algorithms for deriving additional keys from a secret key and other data. See > [JEP 478](https://openjdk.org/jeps/478). src/java.base/share/classes/javax/crypto/KDF.java line 246: > 244: } catch (NoSuchAlgorithmException nsae) { > 245: throw new NoSuchAlgorithmException("Algorithm " + algorithm > + " not available", nsae); > 246: } Why do you catch and rethrow the NSAE exception? Also, `GetInstance.getInstance` does not throw `InvalidParameterSpecException`. You will need to catch the NSAE and see if the cause is an IPSE and then rethrow as an IPSE - see the `CertStore` code for an example. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18924#discussion_r1595609212