This file contains all of the enums and definitions that are used for the CRYS CHACHA-POLY APIs, as well as the APIs themselves.
More...
This file contains all of the enums and definitions that are used for the CRYS CHACHA-POLY APIs, as well as the APIs themselves.
This function is used to perform the CHACHA-POLY encryption and authentication operation.
- Returns
- CRYS_OK on success.
-
A non-zero value on failure as defined crys_chacha_poly_error.h.
- Parameters
-
[in] | pNonce | A pointer to a buffer containing the nonce value. |
[in] | pKey | A pointer to the user's key buffer. |
[in] | encryptDecryptFlag | A flag specifying whether the CHACHA-POLY should perform an Encrypt or Decrypt operation. |
[in] | pAddData | A pointer to the buffer of the additional data to the POLY. The pointer does not need to be aligned. must not be null. |
[in] | addDataSize | The size of the input data. must not be 0. |
[in] | pDataIn | A pointer to the buffer of the input data to the CHACHA. The pointer does not need to be aligned. must not be null. |
[in] | dataInSize | The size of the input data. must not be 0. |
[out] | pDataOut | A pointer to the buffer of the output data from the CHACHA. must not be null. |
[in,out] | macRes | Pointer to the MAC result buffer. |