RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v36]

Kevin Driver kdriver at openjdk.org
Mon Sep 16 17:04:27 UTC 2024


On Sat, 14 Sep 2024 22:40:15 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Kevin Driver has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   refine wording on DPS getInstance with params exception
>
> src/java.base/share/classes/javax/crypto/KDF.java line 426:
> 
>> 424:      * @throws InvalidAlgorithmParameterException
>> 425:      *     if the specified provider does not support a {@code KDFSpi}
>> 426:      *     implementation for the specified algorithm and parameters
> 
> Do not mention `algorithm` in this `@throws`. It's already covered by `@throws NSAE`. Same below.

It is intended to refer to the pair/combination of algorithm and parameters. This wording was chosen by another reviewer.

> src/java.base/share/classes/javax/crypto/KDF.java line 530:
> 
>> 528:      *     results in something invalid
>> 529:      * @throws NoSuchAlgorithmException
>> 530:      *     if {@code alg} is empty or invalid
> 
> Is it easy to tell precisely what falls into "combination of alg and derivationSpec results in something invalid" and what falls into "alg is invalid"?

Yes.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1761518532
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1761522596


More information about the security-dev mailing list