aes.h
Go to the documentation of this file.
1 /********************************************************************************************************
2  * @file aes.h
3  *
4  * @brief This is the header file for TLSR8258
5  *
6  * @author Driver Group
7  * @date May 8, 2018
8  *
9  * @par Copyright (c) 2018, Telink Semiconductor (Shanghai) Co., Ltd.
10  * All rights reserved.
11  *
12  * The information contained herein is confidential property of Telink
13  * Semiconductor (Shanghai) Co., Ltd. and is available under the terms
14  * of Commercial License Agreement between Telink Semiconductor (Shanghai)
15  * Co., Ltd. and the licensee or the terms described here-in. This heading
16  * MUST NOT be removed from this file.
17  *
18  * Licensees are granted free, non-transferable use of the information in this
19  * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
20  * @par History:
21  * 1.initial release(DEC. 26 2018)
22  *
23  * @version A001
24  *
25  *******************************************************************************************************/
26 
27 #ifndef AES_H_
28 #define AES_H_
29 #include "compiler.h"
39 extern int aes_encrypt(unsigned char *Key, unsigned char *Data, unsigned char *Result);
40 
41 #define AES_Encrypt aes_encrypt
42 
52 extern int aes_decrypt(unsigned char *Key, unsigned char *Data, unsigned char *Result);
53 
54 #define AES_Decrypt aes_decrypt
55 
67 extern int aes_dma_encrypt(unsigned char *Key,unsigned long *Data,unsigned short DataSize, unsigned long *Result,unsigned short ResultSize);
79 extern int aes_dma_decrypt(unsigned char *Key,unsigned long *Data,unsigned short DataSize, unsigned long *Result,unsigned short ResultSize);
80 
81 
82 #endif /* AES_H_ */
83  //end of GP2
152 
153 
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...
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...
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...
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...