SmartSnippets DA1459x SDK
ad_crypto.h
Go to the documentation of this file.
1 
44 #ifndef AD_CRYPTO_H_
45 #define AD_CRYPTO_H_
46 
47 #if dg_configCRYPTO_ADAPTER
48 
49 #if dg_configUSE_HW_AES
50 #include "hw_aes.h"
51 #endif
52 #if dg_configUSE_HW_HASH
53 #include "hw_hash.h"
54 #endif
55 
56 #include "hw_aes_hash.h"
57 
58 #include <osal.h>
59 
63 typedef void *ad_crypto_handle_t;
64 
68 typedef enum {
69 #if dg_configUSE_HW_AES
70  AD_CRYPTO_ALGO_AES = 0,
71 #endif
72 
73 #if dg_configUSE_HW_HASH
74  AD_CRYPTO_ALGO_HASH = 1,
75 #endif
77 
81 typedef union {
82 #if dg_configUSE_HW_AES
84 #endif
85 
86 #if dg_configUSE_HW_HASH
88 #endif
90 
94 typedef struct {
98 
112 
129 
145 ad_crypto_handle_t ad_crypto_open(ad_crypto_config_t *cfg, OS_TICK_TIME timeout);
146 
157 void ad_crypto_close(void);
158 
166 OS_BASE_TYPE ad_crypto_perform_operation(OS_TICK_TIME timeout);
167 
168 #endif /* dg_configCRYPTO_ADAPTER */
169 
170 #endif /* AD_CRYPTO_H_ */
171 
ad_crypto_engine_config_t::hash
hw_hash_config_t hash
Definition: ad_crypto.h:87
hw_aes.h
Definition of API for the AES Engine Low Level Driver.
ad_crypto_perform_operation
OS_BASE_TYPE ad_crypto_perform_operation(OS_TICK_TIME timeout)
Perform crypto operation.
AD_CRYPTO_ALGO
AD_CRYPTO_ALGO
Supported cryptographic algorithms.
Definition: ad_crypto.h:68
ad_crypto_config_t::algo
AD_CRYPTO_ALGO algo
Definition: ad_crypto.h:95
ad_crypto_config_t::engine
ad_crypto_engine_config_t engine
Definition: ad_crypto.h:96
hw_hash.h
Definition of API for the HASH Engine Low Level Driver.
hw_aes_config_t
AES engine configuration structure.
Definition: hw_aes.h:127
ad_crypto_engine_config_t::aes
hw_aes_config_t aes
Definition: ad_crypto.h:83
osal.h
OS abstraction layer API.
hw_aes_hash.h
Definition of API for the AES/HASH Engine Low Level Driver.
ad_crypto_engine_config_t
Crypto configuration union.
Definition: ad_crypto.h:81
ad_crypto_handle_t
void * ad_crypto_handle_t
Crypto handle returned by ad_crypto_open()
Definition: ad_crypto.h:63
ad_crypto_close
void ad_crypto_close(void)
Close crypto engine.
ad_crypto_open
ad_crypto_handle_t ad_crypto_open(ad_crypto_config_t *cfg, OS_TICK_TIME timeout)
Open crypto engine.
ad_crypto_configure_for_next_fragment
void ad_crypto_configure_for_next_fragment(ad_crypto_config_t *cfg)
Configure crypto engine to perform next fragment of operation.
hw_hash_config_t
HASH engine configuration structure.
Definition: hw_hash.h:91
ad_crypto_config_t
Crypto adapter configuration structure.
Definition: ad_crypto.h:94
ad_crypto_configure
void ad_crypto_configure(ad_crypto_config_t *cfg)
Configure the crypto engine.