On Thu, 4 Sep 2025 08:42:10 GMT, Ferenc Rakoczi <d...@openjdk.org> wrote:
>> Jamil Nimeh has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove unneeded comments > > test/jdk/com/sun/crypto/provider/Cipher/ChaCha20/UpdateAADTest.java line 115: > >> 113: >> 114: try { >> 115: cipher.updateAAD(buffer); > > Shouldn't we also check that the cipher's state is what we expected after > this update? I've added a check on the buffer position and limit to ensure that the buffer has no remaining data at the end. This can only happen if processMultipleBlocks ends with the buffer's position left at the first byte of trailing data where 0 <= remaining < 16. The engineUpdate method will take care of any remaining non-block aligned data (if it exists). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27081#discussion_r2322534685