The section has a list of all the exported API which the applications need to invoke in order to use the Crypto driver.
More...
|
int32_t | Crypto_close (Crypto_Handle handle) |
|
void | Crypto_init (void) |
|
Crypto_Handle | Crypto_open (Crypto_Type cryptoType) |
|
int32_t | Crypto_hmacParams_init (Crypto_HmacParams *params) |
|
int32_t | Crypto_encrypt (Crypto_Handle handle, Crypto_AESMode mode, uint8_t *ptrInput, uint32_t dataLength, uint8_t *ptrOutput, Crypto_EncryptParams *ptrParams) |
|
int32_t | Crypto_decrypt (Crypto_Handle handle, Crypto_AESMode mode, uint8_t *ptrInput, uint32_t dataLength, uint8_t *ptrOutput, Crypto_EncryptParams *ptrParams) |
|
int32_t | Crypto_sign (Crypto_Handle handle, Crypto_HmacMode mode, uint8_t *ptrInput, uint32_t dataLength, uint8_t *ptrSignature, Crypto_HmacParams *ptrParams) |
|
int32_t | Crypto_verify (Crypto_Handle handle, Crypto_HmacMode mode, uint8_t *ptrInput, uint32_t dataLength, uint8_t *ptrSignature, Crypto_HmacParams *ptrParams) |
|
The section has a list of all the exported API which the applications need to invoke in order to use the Crypto driver.
Description
The function is the Crypto driver close function called close a Crypto Driver instance is being closed
- Parameters
-
[in] | handle | Handle to the Crypto Driver |
- Return values
-
Success | - 0 |
Error | - Crypto Error code |
Description
The function is called to decrypt ciphered text data using a specific AES mode. Depending on the mode the data is encrypted and or authenticated. The additional result is stored in the encrypt output parameters.
- Parameters
-
[in] | handle | Handle to the Crypto Driver |
[in] | mode | AES encrypt mode. |
[in] | ptrInput | Pointer to the input data buffer. |
[in] | dataLength | Data length in bytes. Valid values are 1 to less than 2^32. |
[out] | ptrOutput | Pointer to the output data buffer. |
[in] | ptrParams | Pointer AES parameters. This structure contains both input and output parameters based on the mode. |
- Return values
-
Success | - 0 |
Error | - Crypto Error code |
Description
The function is called to encrypt plain text data using a specific AES mode. Depending on the mode the data is encrypted and or authenticated. The additional result is stored in the encrypt output parameters.
- Parameters
-
[in] | handle | Handle to the Crypto Driver |
[in] | mode | AES encrypt mode. |
[in] | ptrInput | Pointer to the input data buffer. |
[in] | dataLength | Data length in bytes. Valid values are 1 to less than 2^32. |
[out] | ptrOutput | Pointer to the output data buffer. |
[in] | ptrParams | Pointer AES parameters. This structure contains both input and output parameters based on the mode. |
- Return values
-
Success | - 0 |
Error | - Crypto Error code |
Description
The function is initializes the HMAC default parameters.
- Parameters
-
[in] | params | Pointer to HMAC params. |
- Return values
-
Success | - 0 |
Error | - Crypto Error code |
void Crypto_init |
( |
void |
| ) |
|
Description
The function is the Crypto driver initialization function.
- Return values
-
Description
The function is the registered callback function which is invoked when the Crypto Driver instance is being opened with a specific application supplied arguments.
- Parameters
-
[in] | type | Type of Crypto instance that is opened. Valid values are Crypto_AES - AES Crypto engine Crypto_HMAC - HMAC Crypto engine |
- Return values
-
Success | - Driver Handle |
Error | - NULL |
Description
The function is called to generate the HMAC Hash value of given plain Text.
- Parameters
-
[in] | handle | Handle to the Crypto Driver |
[in] | mode | HMAC hash algorithm. |
[in] | ptrInput | Pointer to the input data buffer. |
[in] | dataLength | Data length in bytes. |
[in] | ptrSignature | Pointer to the HMAC Hash. input pointer - If HMAC flag was set, the ptrSignature pointer is used as the input HMAC Hash value. output pointer - For the generated Hash value. |
[in] | ptrParams | Pointer HMAC parameters. |
- Return values
-
Success | - 0 |
Error | - Crypto Error code |
Description
The function is called to verify the HMAC Hash value of given input Text.
- Parameters
-
[in] | handle | Handle to the Crypto Driver |
[in] | mode | HMAC hash algorithm. |
[in] | ptrInput | Pointer to the input data buffer. |
[in] | dataLength | Data length in bytes. |
[in] | ptrSignature | Pointer to the HMAC Hash. input pointer - If HMAC flag was set, the ptrSignature pointer is used as the input HMAC Hash value. output pointer - For the generated Hash value. |
[in] | ptrParams | Pointer HMAC parameters. |
- Return values
-
Success | - 0 |
Error | - Crypto Error code |