On Mon, 13 May 2024 22:34:04 GMT, Kevin Driver <kdri...@openjdk.org> wrote:
>> src/java.base/share/classes/com/sun/crypto/provider/HkdfKeyDerivation.java >> line 237: >> >>> 235: } catch (InvalidKeyException ike) { >>> 236: throw new InvalidParameterSpecException( >>> 237: "Issue encountered when combining ikm or salt >>> values into single keys"); >> >> add cause (ike) to exception. > > What is the preferred mechanism for this? This type does not have a Throwable > parameter, so I can't pass `ike` to the ctor. Unfortunately, in this case, you have to store the exception to a variable, call` setCause` on it, and then return it. >> src/java.base/share/classes/com/sun/crypto/provider/HkdfKeyDerivation.java >> line 407: >> >>> 405: } >>> 406: >>> 407: public static final class HkdfSHA256 extends HkdfKeyDerivation { >> >> Can these classes be package-private instead of public? > > It looks like they must be public, at least with the way things are organized > currently. I think so. I remember JCA requires the class to be public. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18924#discussion_r1599170282 PR Review Comment: https://git.openjdk.org/jdk/pull/18924#discussion_r1599168630