MW_AES_AesEcbEncrypt
C
uint16_t MW_AES_AesEcbEncrypt(MW_AES_Ctx_T * p_ctx, uint16_t length, uint8_t *p_chiperText, uint8_t *p_plainText);Description
The API is used to encrypt a block of data using the AES ECB mode.
Parameters
| Parameter | Description |
|---|---|
| [in] p_ctx | Pointer to the structure of AES context. Refer to MW_AES_Ctx_T for detail structure info. |
| [in] length | The length of data to be decrypted. |
| [out] p_chiperText | Pointer to buffer to store the results of the encryption. |
| [in] p_plainText | Pointer to buffer holding the data to be encrypted. |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | Descrypt successfully. |
| MBA_RES_FAIL | Failed to Encrypt. |
