On Thu, 8 May 2025 18:04:58 GMT, Valerie Peng <[email protected]> wrote:
>> Or in the meantime:
>>
>> } finally {
>> // Best effort
>> if (eae_prk instanceof SecretKeySpec s) {
>> SharedSecrets.getJavaxCryptoSpecAccess()
>> .clearSecretKeySpec(s);
>> } else {
>> try {
>> eae_prk.destroy();
>> } catch (DestroyFailedException e) {
>> // swallow
>> }
>> }
>> }
>
> Sounds good, thanks for the suggestion.
This is what I did in my Exporter code. Assuming you go in first, I'll update
mine to use your Util method.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24393#discussion_r2082763358