On Thu, 6 Aug 2026 21:35:48 GMT, Valerie Peng <[email protected]> wrote:

>> Initial commit containing the public API changes and related regression 
>> tests.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Valerie Peng has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   import cleanup.

src/java.base/share/classes/javax/crypto/spec/Argon2ParameterSpec.java line 43:

> 41:  * iterations, degree of parallelism, output tag length, version, and 
> optional
> 42:  * secret and associated data.
> 43:  *

I think you need a sentence here explaining how to create `Argon2ParameterSpec` 
objects with a builder, you could then lead right into the next sentence, ex:

"`Argon2ParameterSpec`s are constructed with an `Argon2ParameterSpec.Builder` 
and then used to initialize a `KDF` object ..."

src/java.base/share/classes/javax/crypto/spec/Argon2ParameterSpec.java line 45:

> 43:  *
> 44:  * <p>This class can be used to initialize a {@link javax.crypto.KDF} 
> object
> 45:  * for one of the {@code Argon2} algorithm: {@code Argon2i}, {@code 
> Argon2d},

s/algorithm/algorithms/

src/java.base/share/classes/javax/crypto/spec/Argon2ParameterSpec.java line 47:

> 45:  * for one of the {@code Argon2} algorithm: {@code Argon2i}, {@code 
> Argon2d},
> 46:  * or {@code Argon2id}.
> 47:  *

I also think it would be useful to include a code sample showing a more common 
configuration - the one from the JEP would be good. Argon2 has a lot of 
parameters, so a code sample would be a good idea.

src/java.base/share/classes/javax/crypto/spec/Argon2ParameterSpec.java line 440:

> 438: 
> 439:     /**
> 440:      * {@return a copy of the optional secret value, or an empty array

Why return an empty array instead of null? Seems a bit unusual for security 
APIs.

src/java.base/share/classes/javax/crypto/spec/Argon2ParameterSpec.java line 466:

> 464:      * @return a string representation of this parameter set
> 465:      */
> 466:     public String toString() {

Add `@Override`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29597#discussion_r3813482810
PR Review Comment: https://git.openjdk.org/jdk/pull/29597#discussion_r3813484435
PR Review Comment: https://git.openjdk.org/jdk/pull/29597#discussion_r3813594909
PR Review Comment: https://git.openjdk.org/jdk/pull/29597#discussion_r3813672337
PR Review Comment: https://git.openjdk.org/jdk/pull/29597#discussion_r3813676718

Reply via email to