in
{
assert (output.length >= buf.length, "output buffer too small");
if (forEncryption)
{
assert (output.length >= 2 * blockSize, "output buffer too small. 2*blockSize required, because possibly appending one full padding block");
}
else
{
assert (bufOff == blockSize, "last block incomplete for decryption");
}
}
encrypt the remaining bytes in the buffer, add the padding