On Fri, 7 Jun 2024 00:39:50 GMT, Valerie Peng <valer...@openjdk.org> wrote:

>> Francisco Ferrari Bihurriet has updated the pull request incrementally with 
>> one additional commit since the last revision:
>> 
>>   Apply code-review suggestion
>>   
>>   Co-authored-by: Francisco Ferrari <fferr...@redhat.com>
>>   Co-authored-by: Martin Balao <mba...@redhat.com>
>
> test/jdk/sun/security/pkcs11/Cipher/TestCipherTextStealingMultipart.java line 
> 139:
> 
>> 137:         byte [] outArray = new byte[cipher.getOutputSize(0) + outOfs];
>> 138:         cipher.doFinal(outArray, outOfs);
>> 139:         actualCiphertextBuf.put(outArray, outOfs, outArray.length - 
>> outOfs);
> 
> Add this offset testing to the decryption part as well?

Ok, I'll add it but it's not the same for decryption because it's the cipher 
text what has (potentially) to be reordered and output buffer will be for plain 
text. In fact, the reordering is over `padBuffer` (that has the last bytes of 
cipher text) for decryption.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18898#discussion_r1630487007

Reply via email to