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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org