mbedtls_aes_crypt_ecb() function
This function performs an AES single-block encryption or decryption operation. It performs the operation defined in the \p mode parameter (encrypt or decrypt), on the input data buffer defined in the \p input parameter. mbedtls_aes_init(), and either mbedtls_aes_setkey_enc() or mbedtls_aes_setkey_dec() must be called before the first call to this API with the same context.
Arguments
ctx
The AES context to use for encryption or decryption. It must be initialized and bound to a key.
mode
The AES operation: #MBEDTLS_AES_ENCRYPT or #MBEDTLS_AES_DECRYPT.
input
The buffer holding the input data. It must be readable and at least \c 16 Bytes long.
output
The buffer where the output data will be written. It must be writeable and at least \c 16 Bytes long.
Return value
\c 0 on success.
mbedtls_aes_crypt_ecb() is called by 4 functions and calls 2 functions:
![]()
mbedtls_aes_crypt_ecb()
mbedtls_aes_crypt_ecb():
![]()
mbedtls_aes_crypt_ecb()