MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClHash_Functions.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020-2022 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 
17 #ifndef MCUXCLHASH_FUNCTIONS_H_
18 #define MCUXCLHASH_FUNCTIONS_H_
19 
20 #include <mcuxClConfig.h> // Exported features flags header
21 #include <mcuxClSession_Types.h>
22 #include <mcuxClHash_Types.h>
23 #include <mcuxCsslFlowProtection.h>
25 #include <mcuxClCore_Buffer.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
38 /**********************************************************************/
39 /* ONE-SHOT */
40 /**********************************************************************/
41 
80 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClHash_compute)
82  mcuxClSession_Handle_t session,
83  mcuxClHash_Algo_t algorithm,
85  uint32_t inSize,
86  mcuxCl_Buffer_t pOut,
87  uint32_t *const pOutSize
88 ); /* oneshot compute */
89 
90 
91 /**********************************************************************/
92 /* MULTIPART */
93 /**********************************************************************/
94 
112 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClHash_init)
114  mcuxClSession_Handle_t session,
115  mcuxClHash_Context_t pContext,
116  mcuxClHash_Algo_t algorithm
117 ); /* init */
118 
141 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClHash_process)
143  mcuxClSession_Handle_t session,
144  mcuxClHash_Context_t pContext,
146  uint32_t inSize
147 ); /* update */
148 
170 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClHash_finish)
172  mcuxClSession_Handle_t session,
173  mcuxClHash_Context_t pContext,
174  mcuxCl_Buffer_t pOut,
175  uint32_t *const pOutSize
176 ); /* finalize compute */
177 
178 
179  /* mcuxClHash_Functions */
183 
184 #ifdef __cplusplus
185 } /* extern "C" */
186 #endif
187 
188 #endif /* MCUXCLHASH_FUNCTIONS_H_ */
189 
uint32_t mcuxClHash_Status_t
Hash Status type.
Definition: mcuxClHash_Types.h:81
mcuxClSession_Descriptor_t *const mcuxClSession_Handle_t
Type for mcuxClSession Handle.
Definition: mcuxClSession_Types.h:124
#define MCUX_CSSL_FP_FUNCTION_DECL(...)
Declaration of a flow protected function.
Definition: mcuxCsslFlowProtection.h:125
uint8_t *const mcuxCl_Buffer_t
Generic buffer typeThis type provides a pointer to the memory location that can be used for both read...
Definition: mcuxClCore_Buffer.h:51
mcuxClHash_ContextDescriptor_t *const mcuxClHash_Context_t
Hash Context type.
Definition: mcuxClHash_Types.h:73
MCUX_CSSL_FP_PROTECTED_TYPE(mcuxClHash_Status_t) mcuxClHash_compute(mcuxClSession_Handle_t session
One-shot Hash computation function.
Definition: mcuxCsslFlowProtection_example.c:137
Type definitions for the mcuxClSession component.
Type definitions for the mcuxClHash component.
Definition of function identifiers for the flow protection mechanism.
const uint8_t *const mcuxCl_InputBuffer_t
Input buffer typeThis type provides a pointer to the memory location that should be used to read inpu...
Definition: mcuxClCore_Buffer.h:42
const mcuxClHash_AlgorithmDescriptor_t *const mcuxClHash_Algo_t
Hash mode/algorithm type.
Definition: mcuxClHash_Types.h:55
Provides the API for the CSSL flow protection mechanism.