
#ifndef NVM_PRV_CRYPTO_TYPES_H
#define NVM_PRV_CRYPTO_TYPES_H
/*
 **********************************************************************************************************************
 * Includes
 **********************************************************************************************************************
 */

/*
 **********************************************************************************************************************
 * Type definitions
 **********************************************************************************************************************
 */
#if (defined(NVM_CRYPTO_USED) && (NVM_CRYPTO_USED == STD_ON))

typedef enum
{
    NvM_Prv_Crypto_idService_GenerateRandom_e,
    NvM_Prv_Crypto_idService_Encrypt_e,
    NvM_Prv_Crypto_idService_Decrypt_e,
    NvM_Prv_Crypto_idService_GenerateSignature_e,
    NvM_Prv_Crypto_idService_VerifySignature_e,

    //-------------------------------------------------------------------------
    // This is actually no cryptographic service ID,
    // in fact this enum value defines count of cryptographic services
    // available in NvM and can be used for array definitions
    //-------------------------------------------------------------------------
    NvM_Prv_Crypto_idService_Count_e

} NvM_Prv_Crypto_idService_ten;

/**
 * Definition of the structure for the block configuration concerning cryptographic services.
 */
typedef struct
{
    /// Pointer to the associated data used for AEAD encryption.
    uint8 const* dataJobCsmAssociated_pcu8;

    /// Array with Csm job IDs for all cryptographic services provided by the NvM.
    /// For cryptographic services definition see NvM_Prv_Crypto_idJob_ten.
    uint32 idJobCsm_auo[NvM_Prv_Crypto_idService_Count_e];

    /// Array with primary output lengths in bytes for all cryptographic services provided by the NvM.
    /// For cryptographic services definition see NvM_Prv_Crypto_idJob_ten.
    uint16 LengthJobCsm_auo[NvM_Prv_Crypto_idService_Count_e];
    /// Associated data length in bytes used for AEAD encryption.
    /// \attention
    /// If associated data length is set to 0 then NvM will use standard data encryption.
    /// Only if this length is not 0 NvM will use AEAD data encryption.
    uint16 LengthJobCsmAssociated_uo;
    /// Length of the tag in bytes generated by the Csm for AEAD encryption.
    /// \attention
    /// If AEAD data encryption is not used then tag length is configured to 0.
    uint16 LengthJobCsmTag_uo;

} NvM_Prv_Crypto_BlockConfig_tst;

#endif

/* NVM_PRV_CRYPTO_TYPES_H */
#endif

