On Wed, 1 Apr 2026 19:52:26 GMT, Sean Mullan <[email protected]> wrote:

>> Weijun Wang has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   change to the current bug id
>
> src/java.base/share/classes/javax/crypto/Cipher.java line 2646:
> 
>> 2644:      *          (must be greater than 0)
>> 2645:      *
>> 2646:      * @return the derived data
> 
> Is this a new array/clone or not?

It's definitely a new copy. I never thought about mentioning if it's a copy 
because it's always calculated on-demand. It's not a state that was stored 
there for later retrieval.

`KDF::deriveData` and `ExtendedSSLSession::exportKeyingMaterialData` haven't 
mentioned it. `KeyAgreement::generateSecret` says `@return the new buffer with 
the shared secret` that implies it's a new array.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18409#discussion_r3024500066

Reply via email to