RFR: 8366833: Poly1305 does not always correctly update position for array-backed ByteBuffers after processMultipleBlocks [v5]
Jamil Nimeh
jnimeh at openjdk.org
Fri Sep 12 14:22:56 UTC 2025
On Fri, 12 Sep 2025 14:12:17 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> Jamil Nimeh has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add tests for encryption correctness, also add tests for MemorySegment ByteBuffers
>
> test/jdk/com/sun/crypto/provider/Cipher/ChaCha20/UpdateAADTest.java line 74:
>
>> 72:
>> 73: public interface TestAction {
>> 74: void runTest(ByteBuffer buffer);
>
> If you allow `runTest` to throw an exception, then there is no need to catch and rethrow in the 2 instances.
Good point, I think that's a remnant from when I had those callbacks as `Runnable` implementations and had to rewrap the checked exceptions inside unchecked ones. I'll change the interface to throw exception as you suggested.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27081#discussion_r2344405588
More information about the security-dev
mailing list