ISVP-SDK  3.12.0
Ingenic Smart Video Platform SDK
Data Structures | Macros | Typedefs | Enumerations | Functions
su_cipher.h File Reference

Sysutils The Encryption and Decryption management header file. More...

Go to the source code of this file.

Data Structures

struct  IN_UNF_CIPHER_CTRL_S
 Select the encryption process control structure. More...
 

Macros

#define REINIT   -10
 Error Code. More...
 
#define INIT_FAILED   -11
 Initializatie failed.
 
#define FAILED_GETHANDLE   -12
 Get handle failed.
 
#define INVALID_PARA   -13
 Invalid parameter.
 
#define SET_PARA_FAILED   -14
 Set parameters fail.
 
#define FAILURE   -15
 Operate failure.
 
#define SET_DATALEN_ERR   -16
 Set data length error.
 
#define EXIT_ERR   -17
 Module exit error.
 
#define UNINIT   -18
 Module not initialization.
 
#define FAILED_DESHANDLE   -19
 Destroy handle failed.
 

Typedefs

typedef enum IN_UNF_CIPHER_ALG_E IN_UNF_CIPHER_ALG
 Select an encryption algorithm. More...
 
typedef enum IN_UNF_CIPHER_WORK_MODE_E IN_UNF_CIPHER_WORK_MODE
 Select the encryption mode. More...
 
typedef enum IN_UNF_CIPHER_KEY_LENGTH_E IN_UNF_CIPHER_KEY_LENGTH
 Select the encryption key length used. More...
 
typedef enum IN_UNF_CIPHER_BIT_WIDTH_E IN_UNF_CIPHER_BIT_WIDTH
 Select the data length of encryption algorithm at a process. More...
 
typedef struct IN_UNF_CIPHER_CTRL_S IN_UNF_CIPHER_CTRL
 Select the encryption process control structure.
 

Enumerations

enum  IN_UNF_CIPHER_ALG_E { IN_UNF_CIPHER_ALG_AES = 0x0, IN_UNF_CIPHER_ALG_DES = 0x1 }
 Select an encryption algorithm. More...
 
enum  IN_UNF_CIPHER_WORK_MODE_E { IN_UNF_CIPHER_WORK_MODE_ECB = 0x0, IN_UNF_CIPHER_WORK_MODE_CBC = 0x1, IN_UNF_CIPHER_WORK_MODE_OTHER = 0x2 }
 Select the encryption mode. More...
 
enum  IN_UNF_CIPHER_KEY_LENGTH_E { IN_UNF_CIPHER_KEY_AES_128BIT = 0x0 }
 Select the encryption key length used. More...
 
enum  IN_UNF_CIPHER_BIT_WIDTH_E { IN_UNF_CIPHER_BIT_WIDTH_128BIT = 0x0 }
 Select the data length of encryption algorithm at a process. More...
 

Functions

int SU_CIPHER_Init (void)
 Open encryption module. More...
 
int SU_CIPHER_Exit (void)
 Close encryption module. More...
 
int SU_CIPHER_CreateHandle (void)
 Get a encryption module handle. More...
 
int SU_CIPHER_DestroyHandle (int fd)
 Destroy a encryption module handle. More...
 
int SU_CIPHER_ConfigHandle (int hCipher, IN_UNF_CIPHER_CTRL *Ctrl)
 Config encryption module. More...
 
int SU_CIPHER_Encrypt (int hCipher, unsigned int *srcAddr, unsigned int *dstAddr, unsigned int dataLen)
 Start encrypt data. More...
 
int SU_CIPHER_Decrypt (int hCipher, unsigned int *srcAddr, unsigned int *dstAddr, unsigned int dataLen)
 Start decrypt data. More...
 

Detailed Description

Sysutils The Encryption and Decryption management header file.