On Mon, 4 May 2026 17:13:45 GMT, Anthony Scarpino <[email protected]> wrote:

>> Please review the finalized PEM API at https://openjdk.org/jeps/8376991. The 
>> most significant changes from the second preview, JEP 524 
>> (https://openjdk.org/jeps/524), include:
>> 
>> - The `PEM` class is now an ordinary class rather than a record. It adds 
>> Binary-encoded content constructors and data is defensively copied.
>> - The `DEREncodable` interface is renamed to `BinaryEncodable` to more 
>> accurately reflect the binary data stored in PEM text.
>> - In `EncryptedPrivateKeyInfo`, the `encrypt` methods now accept 
>> `BinaryEncodable`, and the `getKey()` and `getKeyPair()` methods no longer 
>> include a `Provider` parameter.
>> - A new `CryptoException` class indicates failures in cryptographic 
>> processing at runtime.
>> 
>> thanks
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Anthony Scarpino has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   comments and new clear()

src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line 276:

> 274:      * @param cipher the initialized {@code Cipher} object which will be
> 275:      * used for decrypting the encrypted data.
> 276:      * @return the PKCS8EncodedKeySpec object with a specified algorithm

What does "with a specified algorithm" mean? "specified" usually means a 
parameter or something related to the API - can you be more specific here?

src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line 363:

> 361:      *         {@code algorithm} is {@code null}
> 362:      * @throws IllegalArgumentException if {@code be} is an unsupported
> 363:      *         {@code BinaryEncodable} or has no encoding.

Nit - remove period.

src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line 406:

> 404:      * @throws CryptoException if an error occurs while generating the
> 405:      *         PBE key, if the default algorithm is misconfigured, or if 
> an
> 406:      *         error occurs during encryption.

Nit - remove period.

src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line 519:

> 517:      *         decryption, or key generation
> 518:      *
> 519:      * @since 25

Change to 27.

src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line 570:

> 568:      *         an error occurs during parsing, decryption, or key 
> generation
> 569:      *
> 570:      * @since 26

Change to 27.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29640#discussion_r3191082824
PR Review Comment: https://git.openjdk.org/jdk/pull/29640#discussion_r3191044716
PR Review Comment: https://git.openjdk.org/jdk/pull/29640#discussion_r3191052223
PR Review Comment: https://git.openjdk.org/jdk/pull/29640#discussion_r3191061007
PR Review Comment: https://git.openjdk.org/jdk/pull/29640#discussion_r3191066589

Reply via email to