aes_sync_ctr_crypt

AES-CTR block encryption/decryption.

int32_t aes_sync_ctr_crypt(
    struct aes_sync_descriptor * descr,
    const uint8_t * input,
    uint8_t * output,
    uint32_t length,
    uint8_t buffer,
    uint8_t nc,
    uint32_t * nc_ofst
)

Parameters

descr

Type: struct aes_sync_descriptor Struct *

The AES descriptor

input

Type: const uint8_t *

Buffer holding the input data

output

Type: uint8_t *

Buffer holding the output data

length

Type: uint32_t

Byte length of the input data

buffer

Type: uint8_t

Stream block for resuming

nc

Type: uint8_t

The 128-bit nonce and counter

nc_ofst

Type: uint32_t *

The offset in the current stream_block (for resuming within current cipher stream). The offset pointer should be 0 at the start of a stream.

Returns

Type: int32_t

ERR_NONE if successful