On Wed, 28 Aug 2024 18:41:52 GMT, Weijun Wang <wei...@openjdk.org> wrote:
>> src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.java line >> 142: >> >>> 140: * if {@code length} is not greater than 0 >>> 141: */ >>> 142: public ExtractThenExpand thenExpand(byte[] info, int length) { >> >> If it is a fairly common use case to not have an `info` parameter, then I >> think we should add a method that does not take this parameter, i.e. >> `thenExpand(int length)`. > > Every time HKDF-Expand is used in either TLS 1.3 or HPKE, there is always a > non-empty info. Even if the original RFC says this argument is optional, I > don't think it's useful to provide a one-argument overloaded method. Agreed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1735262757