<< Previous | Next >>

AESencryptStream4x4_CBC

int AESencryptStream4x4_CBC( AESstreamState * state, long message, long output, unsigned int count);

Description

Perform an AES-CBC encryption operation on XMEM data. Encryption is not "in-place."

See Samples\Crypt\AES_STREAMTEST.C for a sample program and a detailed explanation of the encryption/decryption process.

Parameters

state
An AES stream state structure, initialized via AESinitStream4x4().

This memory must be allocated in the program code before calling AESencrptyStream():

static AESstreamState encrypt_state;

message
The message in plaintext (an xmem buffer)

output
The output buffer, for return of encrypted text (in xmem), must be as large as the plaintext buffer, and may be the same as the plaintext buffer.

count
The length of the message. Must be a multiple of _AES_CBC_BLK_SZ_ (16).

Return Value

0 on success, non-zero on failure (count was not multiple of 16)

Library

AES_CORE.LIB


Dynamic C Functions << Previous | Next >> rabbit.com