RFR: 8325448: Hybrid Public Key Encryption [v44]
Weijun Wang
weijun at openjdk.org
Mon Oct 27 21:10:12 UTC 2025
On Fri, 3 Oct 2025 18:57:10 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:
>> src/java.base/share/classes/com/sun/crypto/provider/HPKE.java line 452:
>>
>>> 450: private static void checkMatch(boolean inSpec, AsymmetricKey k, int kem_id)
>>> 451: throws InvalidKeyException, InvalidAlgorithmParameterException {
>>> 452: var p = k.getParams();
>>
>> nit: It looks like you could have used a `switch (k.params())` here.
>
> There are also other candidates for switch in `Impl.init()` and `engineInit()`
Updated most. `engineInit()` has only if-else and not worth rewriting.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18411#discussion_r2467092679
More information about the security-dev
mailing list