2.3.2.1 Crypto_Aead_AesCcm_Init

crypto_Aead_Status_E Crypto_Aead_AesCcm_Init(
    st_Crypto_Aead_AesCcm_ctx *ptr_aesCcmCtx_st, 
    crypto_HandlerType_E handlerType_en, 
    uint8_t *ptr_key, 
    uint32_t keyLen, 
    uint32_t sessionID
    );

Description

This API is used to initiate the AES-CCM algorithm parameters for the context.

Parameters

No.Argument TypeArgument NameTypeDescription
1st_Crypto_Aead_AesCcm_ctx*ptr_aesCcmCtx_stOutputAES-CCM algorithm context
2crypto_HandlerType_EhandlerType_enInputEnum for crypto operation handler i.e., SW, HW
3uint8_t*ptr_keyInputKey for the AES-CCM cipher operation
4uint32_tkeyLenInputKey length in bytes for the AES-CCM algorithm
5uint32_tsessionIDInputIt defines the session ID, must be more than zero

Returns

Return TypeDescription
crypto_Aead_Status_EFunction returns the status of the API.

Prerequisites

  • To use the HW handler, the algorithm must be enabled in Crypto v4 in MPLAB® Code Configurator.
  • To use the SW handler, the algorithm must be enabled in wolfCrypt, and linked to Crypto V4 in MPLAB® Code Configurator.

Example

Example provided in Crypto_Aead_AesCcm_Cipher.