annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_hal_hash.h @ 79:b33c7f2ae0d9

Added Fontpack reference project
author Ideenmodellierer
date Thu, 04 Oct 2018 20:49:47 +0200
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file stm32f4xx_hal_hash.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.2.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 26-December-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief Header file of HASH HAL module.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * Redistribution and use in source and binary forms, with or without modification,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * are permitted provided that the following conditions are met:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * 1. Redistributions of source code must retain the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * this list of conditions and the following disclaimer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * this list of conditions and the following disclaimer in the documentation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * and/or other materials provided with the distribution.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 * may be used to endorse or promote products derived from this software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 * without specific prior written permission.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #ifndef __STM32F4xx_HAL_HASH_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #define __STM32F4xx_HAL_HASH_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 #if defined(STM32F415xx) || defined(STM32F417xx) || defined(STM32F437xx) || defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 #include "stm32f4xx_hal_def.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 /** @addtogroup STM32F4xx_HAL_Driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 /** @addtogroup HASH
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 * @brief HASH HAL module driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 /* Exported types ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 /** @defgroup HASH_Exported_Types HASH Exported Types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 /** @defgroup HASH_Exported_Types_Group1 HASH Configuration Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 uint32_t DataType; /*!< 32-bit data, 16-bit data, 8-bit data or 1-bit string.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 This parameter can be a value of @ref HASH DataType */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 uint32_t KeySize; /*!< The key size is used only in HMAC operation */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 uint8_t* pKey; /*!< The key is used only in HMAC operation */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 }HASH_InitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 /** @defgroup HASH_Exported_Types_Group2 HASH State structures definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 HAL_HASH_STATE_RESET = 0x00, /*!< HASH not yet initialized or disabled */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 HAL_HASH_STATE_READY = 0x01, /*!< HASH initialized and ready for use */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 HAL_HASH_STATE_BUSY = 0x02, /*!< HASH internal process is ongoing */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 HAL_HASH_STATE_TIMEOUT = 0x03, /*!< HASH timeout state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 HAL_HASH_STATE_ERROR = 0x04 /*!< HASH error state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 }HAL_HASH_STATETypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 /** @defgroup HASH_Exported_Types_Group3 HASH phase structures definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 HAL_HASH_PHASE_READY = 0x01, /*!< HASH peripheral is ready for initialization */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 HAL_HASH_PHASE_PROCESS = 0x02, /*!< HASH peripheral is in processing phase */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 }HAL_HASHPhaseTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 /** @defgroup HASH_Exported_Types_Group4 HASH Handle structures definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 HASH_InitTypeDef Init; /*!< HASH required parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 uint8_t *pHashInBuffPtr; /*!< Pointer to input buffer */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 uint8_t *pHashOutBuffPtr; /*!< Pointer to input buffer */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 __IO uint32_t HashBuffSize; /*!< Size of buffer to be processed */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 __IO uint32_t HashInCount; /*!< Counter of inputed data */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 __IO uint32_t HashITCounter; /*!< Counter of issued interrupts */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 HAL_StatusTypeDef Status; /*!< HASH peripheral status */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 HAL_HASHPhaseTypeDef Phase; /*!< HASH peripheral phase */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 DMA_HandleTypeDef *hdmain; /*!< HASH In DMA handle parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 HAL_LockTypeDef Lock; /*!< HASH locking object */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 __IO HAL_HASH_STATETypeDef State; /*!< HASH peripheral state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 } HASH_HandleTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 /* Exported constants --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 /** @defgroup HASH_Exported_Constants HASH Exported Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 /** @defgroup HASH_Exported_Constants_Group1 HASH Algorithm Selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 #define HASH_ALGOSELECTION_SHA1 ((uint32_t)0x0000) /*!< HASH function is SHA1 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 #define HASH_ALGOSELECTION_SHA224 HASH_CR_ALGO_1 /*!< HASH function is SHA224 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 #define HASH_ALGOSELECTION_SHA256 HASH_CR_ALGO /*!< HASH function is SHA256 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 #define HASH_ALGOSELECTION_MD5 HASH_CR_ALGO_0 /*!< HASH function is MD5 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 /** @defgroup HASH_Exported_Constants_Group2 HASH Algorithm Mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 #define HASH_ALGOMODE_HASH ((uint32_t)0x00000000) /*!< Algorithm is HASH */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 #define HASH_ALGOMODE_HMAC HASH_CR_MODE /*!< Algorithm is HMAC */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 /** @defgroup HASH_Exported_Constants_Group3 HASH DataType
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 #define HASH_DATATYPE_32B ((uint32_t)0x0000) /*!< 32-bit data. No swapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 #define HASH_DATATYPE_16B HASH_CR_DATATYPE_0 /*!< 16-bit data. Each half word is swapped */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 #define HASH_DATATYPE_8B HASH_CR_DATATYPE_1 /*!< 8-bit data. All bytes are swapped */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 #define HASH_DATATYPE_1B HASH_CR_DATATYPE /*!< 1-bit data. In the word all bits are swapped */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 /** @defgroup HASH_Exported_Constants_Group4 HASH HMAC Long key
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 * @brief HASH HMAC Long key used only for HMAC mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 #define HASH_HMAC_KEYTYPE_SHORTKEY ((uint32_t)0x00000000) /*!< HMAC Key is <= 64 bytes */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 #define HASH_HMAC_KEYTYPE_LONGKEY HASH_CR_LKEY /*!< HMAC Key is > 64 bytes */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 /** @defgroup HASH_Exported_Constants_Group5 HASH Flags definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 #define HASH_FLAG_DINIS HASH_SR_DINIS /*!< 16 locations are free in the DIN : A new block can be entered into the input buffer */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 #define HASH_FLAG_DCIS HASH_SR_DCIS /*!< Digest calculation complete */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 #define HASH_FLAG_DMAS HASH_SR_DMAS /*!< DMA interface is enabled (DMAE=1) or a transfer is ongoing */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 #define HASH_FLAG_BUSY HASH_SR_BUSY /*!< The hash core is Busy : processing a block of data */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 #define HASH_FLAG_DINNE HASH_CR_DINNE /*!< DIN not empty : The input buffer contains at least one word of data */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 /** @defgroup HASH_Exported_Constants_Group6 HASH Interrupts definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213 #define HASH_IT_DINI HASH_IMR_DINIM /*!< A new block can be entered into the input buffer (DIN) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 #define HASH_IT_DCI HASH_IMR_DCIM /*!< Digest calculation complete */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 /** @defgroup HASH_Exported_Macros HASH Exported Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 /** @brief Reset HASH handle state
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 * @param __HANDLE__: specifies the HASH handle.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 #define __HAL_HASH_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_HASH_STATE_RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 /** @brief Check whether the specified HASH flag is set or not.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 * @param __FLAG__: specifies the flag to check.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 * @arg HASH_FLAG_DINIS: A new block can be entered into the input buffer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 * @arg HASH_FLAG_DCIS: Digest calculation complete
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 * @arg HASH_FLAG_DMAS: DMA interface is enabled (DMAE=1) or a transfer is ongoing
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 * @arg HASH_FLAG_BUSY: The hash core is Busy : processing a block of data
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 * @arg HASH_FLAG_DINNE: DIN not empty : The input buffer contains at least one word of data
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 * @retval The new state of __FLAG__ (TRUE or FALSE).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 #define __HAL_HASH_GET_FLAG(__FLAG__) ((HASH->SR & (__FLAG__)) == (__FLAG__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 * @brief Enable the multiple DMA mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 * This feature is available only in STM32F429x and STM32F439x devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 #define __HAL_HASH_SET_MDMAT() HASH->CR |= HASH_CR_MDMAT
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 * @brief Disable the multiple DMA mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 #define __HAL_HASH_RESET_MDMAT() HASH->CR &= (uint32_t)(~HASH_CR_MDMAT)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 * @brief Start the digest computation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 #define __HAL_HASH_START_DIGEST() HASH->STR |= HASH_STR_DCAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 * @brief Set the number of valid bits in last word written in Data register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 * @param SIZE: size in byte of last data written in Data register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 #define __HAL_HASH_SET_NBVALIDBITS(SIZE) do{HASH->STR &= ~(HASH_STR_NBW);\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 HASH->STR |= 8 * ((SIZE) % 4);\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 }while(0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 /* Include HASH HAL Extension module */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 #include "stm32f4xx_hal_hash_ex.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 /** @defgroup HASH_Exported_Functions HASH Exported Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 /** @addtogroup HASH_Exported_Functions_Group1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 HAL_StatusTypeDef HAL_HASH_Init(HASH_HandleTypeDef *hhash);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 HAL_StatusTypeDef HAL_HASH_DeInit(HASH_HandleTypeDef *hhash);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 /** @addtogroup HASH_Exported_Functions_Group2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 HAL_StatusTypeDef HAL_HASH_SHA1_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299 HAL_StatusTypeDef HAL_HASH_MD5_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 HAL_StatusTypeDef HAL_HASH_MD5_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 HAL_StatusTypeDef HAL_HASH_SHA1_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 /** @addtogroup HASH_Exported_Functions_Group3
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309 HAL_StatusTypeDef HAL_HMAC_SHA1_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310 HAL_StatusTypeDef HAL_HMAC_MD5_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 /** @addtogroup HASH_Exported_Functions_Group4
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 HAL_StatusTypeDef HAL_HASH_SHA1_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 HAL_StatusTypeDef HAL_HASH_MD5_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 /** @addtogroup HASH_Exported_Functions_Group5
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 HAL_StatusTypeDef HAL_HASH_SHA1_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 HAL_StatusTypeDef HAL_HASH_SHA1_Finish(HASH_HandleTypeDef *hhash, uint8_t* pOutBuffer, uint32_t Timeout);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 HAL_StatusTypeDef HAL_HASH_MD5_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 HAL_StatusTypeDef HAL_HASH_MD5_Finish(HASH_HandleTypeDef *hhash, uint8_t* pOutBuffer, uint32_t Timeout);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 /** @addtogroup HASH_Exported_Functions_Group6
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 HAL_StatusTypeDef HAL_HMAC_SHA1_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339 HAL_StatusTypeDef HAL_HMAC_MD5_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 /** @addtogroup HASH_Exported_Functions_Group7
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 void HAL_HASH_IRQHandler(HASH_HandleTypeDef *hhash);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 /** @addtogroup HASH_Exported_Functions_Group8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355 HAL_HASH_STATETypeDef HAL_HASH_GetState(HASH_HandleTypeDef *hhash);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 void HAL_HASH_MspInit(HASH_HandleTypeDef *hhash);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 void HAL_HASH_MspDeInit(HASH_HandleTypeDef *hhash);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 void HAL_HASH_InCpltCallback(HASH_HandleTypeDef *hhash);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359 void HAL_HASH_DgstCpltCallback(HASH_HandleTypeDef *hhash);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 void HAL_HASH_ErrorCallback(HASH_HandleTypeDef *hhash);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 /* Private types -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370 /** @defgroup HASH_Private_Types HASH Private Types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 /** @defgroup HASH_Private_Variables HASH Private Variables
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387 /* Private constants ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 /** @defgroup HASH_Private_Constants HASH Private Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396 /* Private macros ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 /** @defgroup HASH_Private_Macros HASH Private Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400 #define IS_HASH_ALGOSELECTION(__ALGOSELECTION__) (((__ALGOSELECTION__) == HASH_ALGOSELECTION_SHA1) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 ((__ALGOSELECTION__) == HASH_ALGOSELECTION_SHA224) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 ((__ALGOSELECTION__) == HASH_ALGOSELECTION_SHA256) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403 ((__ALGOSELECTION__) == HASH_ALGOSELECTION_MD5))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406 #define IS_HASH_ALGOMODE(__ALGOMODE__) (((__ALGOMODE__) == HASH_ALGOMODE_HASH) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407 ((__ALGOMODE__) == HASH_ALGOMODE_HMAC))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410 #define IS_HASH_DATATYPE(__DATATYPE__) (((__DATATYPE__) == HASH_DATATYPE_32B)|| \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411 ((__DATATYPE__) == HASH_DATATYPE_16B)|| \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 ((__DATATYPE__) == HASH_DATATYPE_8B) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413 ((__DATATYPE__) == HASH_DATATYPE_1B))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416 #define IS_HASH_HMAC_KEYTYPE(__KEYTYPE__) (((__KEYTYPE__) == HASH_HMAC_KEYTYPE_SHORTKEY) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417 ((__KEYTYPE__) == HASH_HMAC_KEYTYPE_LONGKEY))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423 /* Private functions ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 /** @defgroup HASH_Private_Functions HASH Private Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 #endif /* STM32F415xx || STM32F417xx || STM32F437xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
433 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
434 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
435 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
436
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
437 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
438 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
439 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
440
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
441 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
442 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
443 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
444
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
445
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
446 #endif /* __STM32F4xx_HAL_HASH_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
447
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
448 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/