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