MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClHash_Functions.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020-2023 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 
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 /**********************************************************************/
93 /* MULTIPART */
94 /**********************************************************************/
95 
115  mcuxClSession_Handle_t session,
116  mcuxClHash_Context_t pContext,
117  mcuxClHash_Algo_t algorithm
118 ); /* init */
119 
144  mcuxClSession_Handle_t session,
145  mcuxClHash_Context_t pContext,
147  uint32_t inSize
148 ); /* update */
149 
175  mcuxClSession_Handle_t session,
176  mcuxClHash_Context_t pContext,
177  mcuxCl_Buffer_t pOut,
178  uint32_t *const pOutSize
179 ); /* finalize compute */
180 
181 
182  /* mcuxClHash_Functions */
186 
187 #ifdef __cplusplus
188 } /* extern "C" */
189 #endif
190 
191 #endif /* MCUXCLHASH_FUNCTIONS_H_ */
192 
mcuxClHash_Status_t mcuxClHash_init(mcuxClSession_Handle_t session, mcuxClHash_Context_t pContext, mcuxClHash_Algo_t algorithm)
Multi-part Hash initialization function.
Type definitions for the mcuxClHash component.
uint32_t mcuxClHash_Status_t
Hash Status type.
Definition: mcuxClHash_Types.h:78
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
mcuxClHash_Status_t mcuxClHash_finish(mcuxClSession_Handle_t session, mcuxClHash_Context_t pContext, mcuxCl_Buffer_t pOut, uint32_t *const pOutSize)
Multi-part Hash computation finalization function.
mcuxClHash_Status_t mcuxClHash_compute(mcuxClSession_Handle_t session, mcuxClHash_Algo_t algorithm, mcuxCl_InputBuffer_t pIn, uint32_t inSize, mcuxCl_Buffer_t pOut, uint32_t *const pOutSize)
One-shot Hash computation function.
Type definitions for the mcuxClSession component.
const mcuxClHash_AlgorithmDescriptor_t *const mcuxClHash_Algo_t
Hash mode/algorithm type.
Definition: mcuxClHash_Types.h:50
mcuxClHash_ContextDescriptor_t *const mcuxClHash_Context_t
Hash Context type.
Definition: mcuxClHash_Types.h:70
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_Status_t mcuxClHash_process(mcuxClSession_Handle_t session, mcuxClHash_Context_t pContext, mcuxCl_InputBuffer_t pIn, uint32_t inSize)
Multi-part Hash processing function.
Definition of function identifiers for the flow protection mechanism.
Provides the API for the CSSL flow protection mechanism.
mcuxClSession_Descriptor_t *const mcuxClSession_Handle_t
Type for mcuxClSession Handle.
Definition: mcuxClSession_Types.h:133
#define MCUX_CSSL_FP_FUNCTION_DECL(...)
Declaration of a flow protected function.
Definition: mcuxCsslFlowProtection.h:125
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition: mcuxCsslFlowProtection.h:81