On Wed, 27 Aug 2025 18:09:55 GMT, Matthew Donovan <mdono...@openjdk.org> wrote:
> This PR extends security tests to use ByteBuffers backed by MemorySegments. > Tests in the areas of Signature, Cipher, MessageDigest, and Mac are updated. Looks good, just one comment and a few nitpicks. IMO nits are not worth doing unless there is another commit. test/jdk/javax/crypto/Cipher/GCMAPI.java line 32: > 30: > 31: import javax.crypto.*; > 32: import javax.crypto.spec.*; Nit: Could you please remove the wildcard import here and from other files touched? test/jdk/javax/crypto/Cipher/GCMAPI.java line 72: > 70: updateAADPass(bb); > 71: > 72: try(Arena arena = Arena.ofConfined()) { nit: Suggestion: try (Arena arena = Arena.ofConfined()) { The same for: * `test/jdk/javax/crypto/Mac/ByteBuffers.java` * `test/jdk/javax/crypto/CipherSpi/DirectBBRemaining.java` * `test/jdk/javax/crypto/Cipher/ByteBuffers.java` * `test/jdk/java/security/MessageDigest/ByteBuffers.java` * `test/jdk/sun/security/pkcs11/Signature/ByteBuffers.java` * `test/jdk/sun/security/pkcs11/Cipher/TestPaddingOOB.java` * `test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphers.java` * `test/jdk/sun/security/pkcs11/MessageDigest/ByteBuffers.java` test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphers.java line 215: > 213: } > 214: > 215: private static void execTest(Cipher cipher, byte[]answer, nit: Suggestion: private static void execTest(Cipher cipher, byte[] answer, ------------- PR Review: https://git.openjdk.org/jdk/pull/26967#pullrequestreview-3173544064 PR Review Comment: https://git.openjdk.org/jdk/pull/26967#discussion_r2313919152 PR Review Comment: https://git.openjdk.org/jdk/pull/26967#discussion_r2313877756 PR Review Comment: https://git.openjdk.org/jdk/pull/26967#discussion_r2313872253