On Thu, 13 Mar 2025 19:45:33 GMT, Weijun Wang <wei...@openjdk.org> wrote:
>> src/java.base/share/classes/javax/crypto/spec/HPKEParameterSpec.java line 67: >> >>> 65: * <a href="https://www.iana.org/assignments/hpke/hpke.xhtml">IANA HPKE >>> page</a>. >>> 66: * <p> >>> 67: * Once an {@code HPKEParameterSpec} object is created, additional >>> methods >> >> Are these additional methods commonly called? If so, did you consider using >> something like a Builder to avoid the extra object creations? > > `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? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18411#discussion_r1994223838