ISVP-SDK
3.12.0
Ingenic Smart Video Platform SDK
|
Encryption and Decryption manage. More...
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... | |
Encryption and Decryption manage.
#define REINIT -10 |
Error Code.
Repeat initialization
typedef enum IN_UNF_CIPHER_ALG_E IN_UNF_CIPHER_ALG |
Select an encryption algorithm.
typedef enum IN_UNF_CIPHER_BIT_WIDTH_E IN_UNF_CIPHER_BIT_WIDTH |
Select the data length of encryption algorithm at a process.
typedef enum IN_UNF_CIPHER_KEY_LENGTH_E IN_UNF_CIPHER_KEY_LENGTH |
Select the encryption key length used.
typedef enum IN_UNF_CIPHER_WORK_MODE_E IN_UNF_CIPHER_WORK_MODE |
Select the encryption mode.
enum IN_UNF_CIPHER_ALG_E |
Select an encryption algorithm.
Select the data length of encryption algorithm at a process.
Select the encryption key length used.
Select the encryption mode.
int SU_CIPHER_ConfigHandle | ( | int | hCipher, |
IN_UNF_CIPHER_CTRL * | Ctrl | ||
) |
Config encryption module.
[in] | hCipher | The handle need to be configed. |
[in] | Ctrl | Configuration information structure. |
0 | Success. |
Non-0 | Failure. |
int SU_CIPHER_CreateHandle | ( | void | ) |
Get a encryption module handle.
None. |
success | Return the handle. |
Failure | retval < 0. |
int SU_CIPHER_Decrypt | ( | int | hCipher, |
unsigned int * | srcAddr, | ||
unsigned int * | dstAddr, | ||
unsigned int | dataLen | ||
) |
Start decrypt data.
[in] | hCipher | Handle to be operated.. |
[in] | srcAddr | Source address of required decrypted data. |
[in] | dstAddr | Target address to store decrypted data. |
[in] | dataLen | Data length needed to be processed.. |
0 | Success. |
Non-0 | Failure. |
int SU_CIPHER_DestroyHandle | ( | int | fd | ) |
Destroy a encryption module handle.
[in] | fd | Handle need to be destroy |
0 | Success. |
Non-0 | Failure. |
int SU_CIPHER_Encrypt | ( | int | hCipher, |
unsigned int * | srcAddr, | ||
unsigned int * | dstAddr, | ||
unsigned int | dataLen | ||
) |
Start encrypt data.
[in] | hCipher | Handle to be operated.. |
[in] | srcAddr | Source address of required encrypted data. |
[in] | dstAddr | Target address to store encrypted data. |
[in] | dataLen | Data length needed to be processed.. |
0 | Success. |
Non-0 | Failure. |
int SU_CIPHER_Exit | ( | void | ) |
Close encryption module.
None. |
0 | Success. |
Non-0 | Failure. |
int SU_CIPHER_Init | ( | void | ) |
Open encryption module.
None. |
0 | Success. |
Non-0 | Failure. |