RFR: 8325448: Hybrid Public Key Encryption [v10]
Weijun Wang
weijun at openjdk.org
Fri Mar 14 02:49:59 UTC 2025
On Thu, 13 Mar 2025 19:58:27 GMT, Sean Mullan <mullan at openjdk.org> wrote:
>> `info` and `encapsulation` are frequently called. I don't think it's worth using a builder. The final `build()` call is always the same and unnecessary.
>
> If they are common, would it make more sense to include them as parameters to an overloaded version of the static `of` method?
I'd rather not. There are already three `of` methods. Adding `info` would make make six, and adding `encapsulation` would be twelve. I cannot say which combination is more popular than another one.
Also, the arguments of the current `of` methods are all about algorithm identifiers. Adding `info` and `encapsulation` to the argument list could make the API harder to use, as the method signature only includes the types of the parameters but not their meanings. While providing them through the `info` and `encapsulation` methods are very clean. They also have accompanying "getter" methods with the same names.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18411#discussion_r1994596749
More information about the security-dev
mailing list