Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodTstCustomCipherComponent.EncryptBytes

function EncryptBytes(const aBuf : tBytes; var aOffset, aCount : Integer) : Boolean;
tBytes-array in-place encryption overload of Encrypt, operating on aBuf starting at aOffset for aCount octets. On success it advances aOffset past the ciphertext, returns in aCount how many octets were encrypted (in ECB, CBC and ABC the whole blocks only), and passes those octets to MAC. When the cipher cannot encrypt aBuf in place (see Encrypt), it returns False, with aBuf still the plaintext, which it does not pass to MAC.