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