ThisCall;
+ }
+ }
+ plaintextBuffer.flip();
+ ciphertextBuffer.clear();
Review Comment:
Yes, I think in the current implementation this would break. The decryption
is written assuming that segments will be full. (It could conceivably handle
variable length segments, but then we'd need to pass per-segment lengths as
well.)
Would it make sense to change the check in the FileRegion case to be:
```
if (transferred < readLimit) {
return transferredThisCall;
}
```
If we don't read the limit of what we should be able to, then don't encrypt
this block and wait until `writeTo` is called again to flush it out.
--
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]