tomaswolf commented on issue #455:
URL: https://github.com/apache/mina-sshd/issues/455#issuecomment-1912214920
I was more thinking along the lines (for CTR and CBC; GCM already is OK)
```
public void update(byte[] input, int inputOffset, int inputLen) throws
Exception {
int stored = cipher.update(input, inputOffset, inputLen, input,
inputOffset);
if (stored < inputLen) {
stored += cipher.doFinal(input, inputOffset + stored);
assert stored == inputLen;
reInit (cipher);
}
}
```
That simply guarantees that update always processes all `inputLen` bytes as
implied by the current usage. No API change necessary, no changes in callers
needed.
--
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]