On Tue, 3 Sep 2024 20:36:08 GMT, Weijun Wang <wei...@openjdk.org> wrote:
>> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> change impl class to use byte arrays rather than SecretKey objects where >> possible > > test/jdk/com/sun/crypto/provider/KDF/BasicHKDFFunctions.java line 54: > >> 52: var okm2 = kdf.deriveKey("OKM", extractAndExpand); >> 53: >> 54: if (!Arrays.equals(prk.getEncoded(), expectedPrk)) { > > You can use `Asserts.assertEqualsByteArray` in `/test/lib`. See: https://github.com/openjdk/jdk/pull/20301/commits/59b1743fd225ff34e6bcce055fd47a887ed22a08. > test/jdk/com/sun/crypto/provider/KDF/BasicHKDFFunctions.java line 67: > >> 65: test(HKDFParameterSpec.ofExtract().extractOnly()); >> 66: // test expand with empty info >> 67: test(HKDFParameterSpec.ofExtract().thenExpand(new byte[0], 32)); > > Do you want to test `info == null` also? See: https://github.com/openjdk/jdk/pull/20301/commits/59b1743fd225ff34e6bcce055fd47a887ed22a08. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1746249096 PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1746248828