]> git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/BaseCryptLibNull/Hash/CryptSha512Null.c
CryptoPkg: Add Null instance of the BaseCryptLib class
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibNull / Hash / CryptSha512Null.c
1 /** @file
2 SHA-384 and SHA-512 Digest Wrapper Implementations which does not provide real capabilities.
3
4 Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include "InternalCryptLib.h"
10
11 /**
12 Retrieves the size, in bytes, of the context buffer required for SHA-384 hash operations.
13
14 Return zero to indicate this interface is not supported.
15
16 @retval 0 This interface is not supported.
17
18 **/
19 UINTN
20 EFIAPI
21 Sha384GetContextSize (
22 VOID
23 )
24 {
25 ASSERT (FALSE);
26 return 0;
27 }
28
29 /**
30 Initializes user-supplied memory pointed by Sha384Context as SHA-384 hash context for
31 subsequent use.
32
33 Return FALSE to indicate this interface is not supported.
34
35 @param[out] Sha384Context Pointer to SHA-384 context being initialized.
36
37 @retval FALSE This interface is not supported.
38
39 **/
40 BOOLEAN
41 EFIAPI
42 Sha384Init (
43 OUT VOID *Sha384Context
44 )
45 {
46 ASSERT (FALSE);
47 return FALSE;
48 }
49
50 /**
51 Makes a copy of an existing SHA-384 context.
52
53 Return FALSE to indicate this interface is not supported.
54
55 @param[in] Sha384Context Pointer to SHA-384 context being copied.
56 @param[out] NewSha384Context Pointer to new SHA-384 context.
57
58 @retval FALSE This interface is not supported.
59
60 **/
61 BOOLEAN
62 EFIAPI
63 Sha384Duplicate (
64 IN CONST VOID *Sha384Context,
65 OUT VOID *NewSha384Context
66 )
67 {
68 ASSERT (FALSE);
69 return FALSE;
70 }
71
72 /**
73 Digests the input data and updates SHA-384 context.
74
75 Return FALSE to indicate this interface is not supported.
76
77 @param[in, out] Sha384Context Pointer to the SHA-384 context.
78 @param[in] Data Pointer to the buffer containing the data to be hashed.
79 @param[in] DataSize Size of Data buffer in bytes.
80
81 @retval FALSE This interface is not supported.
82
83 **/
84 BOOLEAN
85 EFIAPI
86 Sha384Update (
87 IN OUT VOID *Sha384Context,
88 IN CONST VOID *Data,
89 IN UINTN DataSize
90 )
91 {
92 ASSERT (FALSE);
93 return FALSE;
94 }
95
96 /**
97 Completes computation of the SHA-384 digest value.
98
99 Return FALSE to indicate this interface is not supported.
100
101 @param[in, out] Sha384Context Pointer to the SHA-384 context.
102 @param[out] HashValue Pointer to a buffer that receives the SHA-384 digest
103 value (48 bytes).
104
105 @retval FALSE This interface is not supported.
106
107 **/
108 BOOLEAN
109 EFIAPI
110 Sha384Final (
111 IN OUT VOID *Sha384Context,
112 OUT UINT8 *HashValue
113 )
114 {
115 ASSERT (FALSE);
116 return FALSE;
117 }
118
119 /**
120 Computes the SHA-384 message digest of a input data buffer.
121
122 Return FALSE to indicate this interface is not supported.
123
124 @param[in] Data Pointer to the buffer containing the data to be hashed.
125 @param[in] DataSize Size of Data buffer in bytes.
126 @param[out] HashValue Pointer to a buffer that receives the SHA-384 digest
127 value (48 bytes).
128
129 @retval FALSE This interface is not supported.
130
131 **/
132 BOOLEAN
133 EFIAPI
134 Sha384HashAll (
135 IN CONST VOID *Data,
136 IN UINTN DataSize,
137 OUT UINT8 *HashValue
138 )
139 {
140 ASSERT (FALSE);
141 return FALSE;
142 }
143
144 /**
145 Retrieves the size, in bytes, of the context buffer required for SHA-512 hash operations.
146
147 Return zero to indicate this interface is not supported.
148
149 @retval 0 This interface is not supported.
150
151 **/
152 UINTN
153 EFIAPI
154 Sha512GetContextSize (
155 VOID
156 )
157 {
158 ASSERT (FALSE);
159 return 0;
160 }
161
162 /**
163 Initializes user-supplied memory pointed by Sha512Context as SHA-512 hash context for
164 subsequent use.
165
166 Return FALSE to indicate this interface is not supported.
167
168 @param[out] Sha512Context Pointer to SHA-512 context being initialized.
169
170 @retval FALSE This interface is not supported.
171
172 **/
173 BOOLEAN
174 EFIAPI
175 Sha512Init (
176 OUT VOID *Sha512Context
177 )
178 {
179 ASSERT (FALSE);
180 return FALSE;
181 }
182
183 /**
184 Makes a copy of an existing SHA-512 context.
185
186 Return FALSE to indicate this interface is not supported.
187
188 @param[in] Sha512Context Pointer to SHA-512 context being copied.
189 @param[out] NewSha512Context Pointer to new SHA-512 context.
190
191 @retval FALSE This interface is not supported.
192
193 **/
194 BOOLEAN
195 EFIAPI
196 Sha512Duplicate (
197 IN CONST VOID *Sha512Context,
198 OUT VOID *NewSha512Context
199 )
200 {
201 ASSERT (FALSE);
202 return FALSE;
203 }
204
205 /**
206 Digests the input data and updates SHA-512 context.
207
208 Return FALSE to indicate this interface is not supported.
209
210 @param[in, out] Sha512Context Pointer to the SHA-512 context.
211 @param[in] Data Pointer to the buffer containing the data to be hashed.
212 @param[in] DataSize Size of Data buffer in bytes.
213
214 @retval FALSE This interface is not supported.
215
216 **/
217 BOOLEAN
218 EFIAPI
219 Sha512Update (
220 IN OUT VOID *Sha512Context,
221 IN CONST VOID *Data,
222 IN UINTN DataSize
223 )
224 {
225 ASSERT (FALSE);
226 return FALSE;
227 }
228
229 /**
230 Completes computation of the SHA-512 digest value.
231
232 Return FALSE to indicate this interface is not supported.
233
234 @param[in, out] Sha512Context Pointer to the SHA-512 context.
235 @param[out] HashValue Pointer to a buffer that receives the SHA-512 digest
236 value (64 bytes).
237
238 @retval FALSE This interface is not supported.
239
240 **/
241 BOOLEAN
242 EFIAPI
243 Sha512Final (
244 IN OUT VOID *Sha512Context,
245 OUT UINT8 *HashValue
246 )
247 {
248 ASSERT (FALSE);
249 return FALSE;
250 }
251
252 /**
253 Computes the SHA-512 message digest of a input data buffer.
254
255 Return FALSE to indicate this interface is not supported.
256
257 @param[in] Data Pointer to the buffer containing the data to be hashed.
258 @param[in] DataSize Size of Data buffer in bytes.
259 @param[out] HashValue Pointer to a buffer that receives the SHA-512 digest
260 value (64 bytes).
261
262 @retval FALSE This interface is not supported.
263
264 **/
265 BOOLEAN
266 EFIAPI
267 Sha512HashAll (
268 IN CONST VOID *Data,
269 IN UINTN DataSize,
270 OUT UINT8 *HashValue
271 )
272 {
273 ASSERT (FALSE);
274 return FALSE;
275 }