RFR: 8298420: Implement JEP 470: PEM Encodings of Cryptographic Objects (Preview) [v20]

Krushna948 duke at openjdk.org
Wed May 28 03:18:13 UTC 2025


On Wed, 14 May 2025 15:59:25 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:

>> src/java.base/share/classes/java/security/PEMDecoder.java line 456:
>> 
>>> 454: 
>>> 455:     /**
>>> 456:      * Returns a copy of this {@code PEMDecoder} instance that uses
>> 
>> Why use "a copy"? Do you mean the password is kept?
>
> If this instance was configured with decryption, this method will return a new instance configured with decryption and the factory provider.  I use "a copy" so the user knows they are adding a new configuration and this instance is staying the same

It's little confusing Returns a copy here, and @return a new PEMEncoder instance configured to the {@code Provider}.
Technically it's a new instance by any means ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2102421219


More information about the security-dev mailing list