Mistake on this page?
Report an issue in GitHub or email us
hash_stm32.h
1 /**
2  ******************************************************************************
3  * @brief Header file of mbed TLS HW crypto (HASH) implementation.
4  ******************************************************************************
5  * @attention
6  *
7  * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
8  * Copyright (C) 2019 STMicroelectronics, All Rights Reserved
9  *
10  * This software component is licensed by ST under Apache 2.0 license,
11  * the "License"; You may not use this file except in compliance with the
12  * License. You may obtain a copy of the License at:
13  * https://opensource.org/licenses/Apache-2.0
14  *
15  ******************************************************************************
16  */
17 
18 /* Define to prevent recursive inclusion -------------------------------------*/
19 #ifndef __HASH_H
20 #define __HASH_H
21 
22 #if defined(MBEDTLS_SHA1_ALT) || defined(MBEDTLS_SHA256_ALT) || defined(MBEDTLS_MD5_ALT)
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "cmsis.h"
30 
31 #if defined(MBEDTLS_THREADING_C)
32 #include "mbedtls/threading.h"
33 #endif
34 
35 /* macros --------------------------------------------------------------------*/
36 /* constants -----------------------------------------------------------------*/
37 #define ST_HASH_TIMEOUT ((uint32_t) 1000) /* TO in ms for the hash processor */
38 
39 /* defines -------------------------------------------------------------------*/
40 /* variables -----------------------------------------------------------------*/
41 #if defined(MBEDTLS_THREADING_C)
42 extern mbedtls_threading_mutex_t hash_mutex;
43 extern unsigned char hash_mutex_started;
44 #endif /* MBEDTLS_THREADING_C */
45 
46 extern unsigned int hash_context_count;
47 
48 /* functions prototypes ------------------------------------------------------*/
49 extern void hash_zeroize(void *v, size_t n);
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 
55 #endif /* MBEDTLS_SHA1_ALT or MBEDTLS_SHA256_ALT or MBEDTLS_MD5_ALT */
56 #endif /*__HASH_H */
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.