rdblue commented on code in PR #3231:
URL: https://github.com/apache/iceberg/pull/3231#discussion_r1278600384
##########
core/src/main/java/org/apache/iceberg/encryption/Ciphers.java:
##########
@@ -67,7 +83,7 @@ public byte[] encrypt(byte[] plainText, byte[] aad) {
if (null != aad) {
cipher.updateAAD(aad);
}
- cipher.doFinal(plainText, 0, plainText.length, cipherText,
NONCE_LENGTH);
+ cipher.doFinal(plaintext, plaintextOffset, plaintextLength,
cipherText, NONCE_LENGTH);
Review Comment:
Does the call to `getInstance` in the constructor guarantee that the
`Cipher` instance is not shared? I'm guessing that it must if it has state
(mode, key, etc.) but I don't see it guaranteed anywhere.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]