CRYPTO_ctr128_encrypt_ctr32

Encrypt or decrypt in CTR mode using a 32-bit counter stream function.

Synopsis

Declared in <openssl/modes.h>

void
CRYPTO_ctr128_encrypt_ctr32(
    unsigned char const* in,
    unsigned char* out,
    size_t len,
    void const* key,
    unsigned char ivec[],
    unsigned char ecount_buf[],
    unsigned int* num,
    ctr128_f ctr);

Parameters

NameDescription
inInput bytes of length len.
outOutput buffer of length len (may equal in).
lenNumber of bytes to process.
keyCipher-specific expanded key for ctr.
ivec16-byte counter block updated as encryption proceeds.
ecount_buf16-byte buffer holding residual encrypted counter output.
numOffset into ecount_buf for residual keystream (updated; start at 0).
ctrMulti-block CTR stream function for the underlying cipher.