NETAESEncrypt

C Specification

#include <revolution/net.h>

BOOL NETAESEncrypt( NETAESContext *context, void *dst, const void *src, u32 len );

Arguments

context Pointer to the AES encryption context structure.
dst Buffer where encrypted text is stored.
The start address of the cache must be aligned at a 32-byte boundary.
src The plain text data from which the encrypted text is generated.
The start address of the cache must be aligned at a 32-byte boundary.
The same address as the storage location (dst) cannot be specified.
len The length of the plain text.
Because block encryption is used, encrypted text must be aligned at a 16-byte boundary.

Return Values

Returns TRUE if the encryption process succeeds. Otherwise, returns FALSE.

Description

This function encrypts plain text, using the AES encryption context. AES encryption context must be generated first by calling the NETAESCreate function.

The encryption process always outputs encrypted text that is the same length as the plain text that was input. The overall content of encrypted text is the same, whether the plain text is all encrypted at once or whether it is divided into appropriate sizes and encrypted sequentially. Blocks are in units of 16 bytes, so any data smaller than a single block cannot be encrypted. If you round up the size during the encryption process to handle data of fewer than 16 bytes, such as text termination fractions, you will must skip this added data when decrypting.

See Also

NETAESCreate, NETAESDecrypt, NETAESDelete

Revision History

2006/10/27 Revised descriptions.
2006/10/12 Initial version.


CONFIDENTIAL