aes.h File Reference

Go to the source code of this file.

Macros

#define AES_Encrypt   aes_encrypt
 
#define AES_Decrypt   aes_decrypt
 

Functions

int aes_encrypt (unsigned char *Key, unsigned char *Data, unsigned char *Result)
 This function servers to perform aes_128 encryption for 16-Byte input data with specific 16-Byte key. More...
 
int aes_decrypt (unsigned char *Key, unsigned char *Data, unsigned char *Result)
 This function servers to perform aes_128 decryption for 16-Byte input data with specific 16-Byte key. More...
 
int aes_dma_encrypt (unsigned char *Key, unsigned long *Data, unsigned short DataSize, unsigned long *Result, unsigned short ResultSize)
 This function servers to perform aes_128 encryption with specific 16-Byte key in DMA MODE. More...
 
int aes_dma_decrypt (unsigned char *Key, unsigned long *Data, unsigned short DataSize, unsigned long *Result, unsigned short ResultSize)
 This function servers to perform aes_128 decryption with specific 16-Byte key in DMA MODE. More...
 

Macro Definition Documentation

◆ AES_Encrypt

#define AES_Encrypt   aes_encrypt

◆ AES_Decrypt

#define AES_Decrypt   aes_decrypt

Function Documentation

◆ aes_encrypt()

int aes_encrypt ( unsigned char *  Key,
unsigned char *  Data,
unsigned char *  Result 
)

This function servers to perform aes_128 encryption for 16-Byte input data with specific 16-Byte key.

Parameters
[in]Keythe pointer to the 16-Byte Key
[in]Datathe pointer to the 16-Byte plain text
[out]Resultthe pointer to the encryption result cipher text
Returns
0: success; not 0: failure

◆ aes_decrypt()

int aes_decrypt ( unsigned char *  Key,
unsigned char *  Data,
unsigned char *  Result 
)

This function servers to perform aes_128 decryption for 16-Byte input data with specific 16-Byte key.

Parameters
[in]Keythe pointer to the 16-Byte Key
[in]Datathe pointer to the 16-Byte cipher text
[out]Resultthe pointer to the decryption result plain text
Returns
0: success; not 0: failure

◆ aes_dma_encrypt()

int aes_dma_encrypt ( unsigned char *  Key,
unsigned long *  Data,
unsigned short  DataSize,
unsigned long *  Result,
unsigned short  ResultSize 
)

This function servers to perform aes_128 encryption with specific 16-Byte key in DMA MODE.

Parameters
[in]Key:the pointer to the 16-Byte Key
[in]Data:the pointer to the 16-Byte plain text
[in]DataSizethe length of Data
[out]ResultSizethe length of Result
[out]Resultthe pointer to the encryption cipher text
Returns
0: success; not 0: failure

◆ aes_dma_decrypt()

int aes_dma_decrypt ( unsigned char *  Key,
unsigned long *  Data,
unsigned short  DataSize,
unsigned long *  Result,
unsigned short  ResultSize 
)

This function servers to perform aes_128 decryption with specific 16-Byte key in DMA MODE.

Parameters
[in]Key:the pointer to the 16-Byte Key
[in]Data:the pointer to the 16-Byte cipher text
[in]DataSizethe length of Data
[out]ResultSizethe length of Result
[out]Resultthe pointer to the decryption result plain text
Returns
0: success; not 0: failure