MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClMac_Functions.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020 NXP */
3 /* */
4 /* NXP Confidential. This software is owned or controlled by NXP and may */
5 /* only be used strictly in accordance with the applicable license terms. */
6 /* By expressly accepting such terms or by downloading, installing, */
7 /* activating and/or otherwise using the software, you are agreeing that */
8 /* you have read, and that you agree to comply with and are bound by, such */
9 /* license terms. If you do not agree to be bound by the applicable license */
10 /* terms, then you may not retain, install, activate or otherwise use the */
11 /* software. */
12 /*--------------------------------------------------------------------------*/
13 
19 #ifndef MCUXCLMAC_FUNCTIONS_H_
20 #define MCUXCLMAC_FUNCTIONS_H_
21 
22 #include <mcuxClSession_Types.h>
23 #include <mcuxClKey_Types.h>
24 #include <mcuxClMac_Types.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
37 /****************************************************************************/
38 /* ONESHOT */
39 /****************************************************************************/
40 
77  mcuxClSession_Handle_t session,
78  const mcuxClKey_Handle_t key,
79  const mcuxClMac_Mode_t mode,
80  const uint8_t * const in,
81  uint32_t inSize,
82  uint8_t * const mac
83 );
84 
85 /****************************************************************************/
86 /* MULTIPART */
87 /****************************************************************************/
88 
119  mcuxClSession_Handle_t session,
120  mcuxClMac_Context_t *const context,
121  const mcuxClKey_Handle_t key,
122  const mcuxClMac_Mode_t mode
123 ); /* init */
124 
155  mcuxClSession_Handle_t session,
156  mcuxClMac_Context_t *const context,
157  const uint8_t *const in,
158  uint32_t inSize
159 ); /* update */
160 
191  mcuxClSession_Handle_t session,
192  mcuxClMac_Context_t *const context,
193  uint8_t *const mac
194 ); /* finalize compute */
195  /* mcuxClMac_Functions */
199 
200 #ifdef __cplusplus
201 } /* extern "C" */
202 #endif
203 
204 #endif /* MCUXCLMAC_FUNCTIONS_H_ */
mcuxClMac_Status_Protected_t mcuxClMac_finish(mcuxClSession_Handle_t session, mcuxClMac_Context_t *const context, uint8_t *const mac)
MAC generation for a multipart MAC computation.
mcuxClMac_Status_Protected_t mcuxClMac_compute(mcuxClSession_Handle_t session, const mcuxClKey_Handle_t key, const mcuxClMac_Mode_t mode, const uint8_t *const in, uint32_t inSize, uint8_t *const mac)
One-shot message authentication code (MAC) computation.
mcuxClSession_Descriptor_t *const mcuxClSession_Handle_t
Type for mcuxClSession Handle.
Definition: mcuxClSession_Types.h:110
mcuxClMac_Status_Protected_t mcuxClMac_init(mcuxClSession_Handle_t session, mcuxClMac_Context_t *const context, const mcuxClKey_Handle_t key, const mcuxClMac_Mode_t mode)
Initialization for a multipart MAC computation.
struct mcuxClMac_Context mcuxClMac_Context_t
Mac context type.
Definition: mcuxClMac_Types.h:118
Type definitions for the mcuxClMac component.
Type of the key handle.
Definition: mcuxClKey_Types.h:104
mcuxClMac_Status_Protected_t mcuxClMac_process(mcuxClSession_Handle_t session, mcuxClMac_Context_t *const context, const uint8_t *const in, uint32_t inSize)
Data processing for a multipart MAC computation.
Type definitions for the mcuxClSession component.
struct mcuxClMac_Mode mcuxClMac_Mode_t
Mac Mode type.
Definition: mcuxClMac_Types.h:73
uint64_t mcuxClMac_Status_Protected_t
Type for error codes used by code-flow protected Mac component functions.
Definition: mcuxClMac_Types.h:53
Type definitions for the mcuxClKey component.
#define MCUX_CSSL_FP_FUNCTION_DECL(id)
Declaration of a flow protected function.
Definition: mcuxCsslFlowProtection.h:119