On Mon, 15 Sep 2025 23:17:18 GMT, Weijun Wang <[email protected]> wrote:

>> I know it's `getFormat`.  Since there is a length check for "RAW", I was 
>> wondering why "PKCS#8", didn't use `psk.getEncoded().length` to checked.  If 
>> you are handling the "RAW" case in this method and later on a short key is 
>> checked, that is fine.
>
> I'm expecting a `SecretKey` here. If it's "PKCS#8", I probably will have to 
> error out somewhere. But then inside `HPKE` the implementation, it should 
> work with both software and hardware keys so I should not look at `getFormat` 
> anymore. Anyway, I'm just trying to do as much as I can.

ok

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18411#discussion_r2403120951

Reply via email to