1.2.2.2.5.1.2.2 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

ParameterDescription
[in] p_ctxPointer to the structure of AES context. Refer to MW_AES_Ctx_T for detail structure info.
[in] lengthThe length of data to be decrypted.
[out] p_chiperTextPointer to buffer to store the results of the encryption.
[in] p_plainTextPointer to buffer holding the data to be encrypted.

Return values

Return valueDescription
MBA_RES_SUCCESSDescrypt successfully.
MBA_RES_FAILFailed to Encrypt.