]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/BaseCryptLib/Hash/CryptSha512Null.c
CryptoPkg Updates to support RFC3161 timestamp signature verification.
[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
4Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
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
125/**\r
126 Retrieves the size, in bytes, of the context buffer required for SHA-512 hash operations.\r
127\r
128 Return zero to indicate this interface is not supported.\r
129\r
130 @retval 0 This interface is not supported.\r
131\r
132**/\r
133UINTN\r
134EFIAPI\r
135Sha512GetContextSize (\r
136 VOID\r
137 )\r
138{\r
139 ASSERT (FALSE);\r
140 return 0;\r
141}\r
142\r
143/**\r
144 Initializes user-supplied memory pointed by Sha512Context as SHA-512 hash context for\r
145 subsequent use.\r
146\r
147 Return FALSE to indicate this interface is not supported.\r
148\r
149 @param[out] Sha512Context Pointer to SHA-512 context being initialized.\r
150\r
151 @retval FALSE This interface is not supported.\r
152\r
153**/\r
154BOOLEAN\r
155EFIAPI\r
156Sha512Init (\r
157 OUT VOID *Sha512Context\r
158 )\r
159{\r
160 ASSERT (FALSE);\r
161 return FALSE;\r
162}\r
163\r
164/**\r
165 Makes a copy of an existing SHA-512 context.\r
166\r
167 Return FALSE to indicate this interface is not supported.\r
168\r
169 @param[in] Sha512Context Pointer to SHA-512 context being copied.\r
170 @param[out] NewSha512Context Pointer to new SHA-512 context.\r
171\r
172 @retval FALSE This interface is not supported.\r
173\r
174**/\r
175BOOLEAN\r
176EFIAPI\r
177Sha512Duplicate (\r
178 IN CONST VOID *Sha512Context,\r
179 OUT VOID *NewSha512Context\r
180 )\r
181{\r
182 ASSERT (FALSE);\r
183 return FALSE;\r
184}\r
185\r
186/**\r
187 Digests the input data and updates SHA-512 context.\r
188\r
189 Return FALSE to indicate this interface is not supported.\r
190\r
191 @param[in, out] Sha512Context Pointer to the SHA-512 context.\r
192 @param[in] Data Pointer to the buffer containing the data to be hashed.\r
193 @param[in] DataSize Size of Data buffer in bytes.\r
194\r
195 @retval FALSE This interface is not supported.\r
196\r
197**/\r
198BOOLEAN\r
199EFIAPI\r
200Sha512Update (\r
201 IN OUT VOID *Sha512Context,\r
202 IN CONST VOID *Data,\r
203 IN UINTN DataSize\r
204 )\r
205{\r
206 ASSERT (FALSE);\r
207 return FALSE;\r
208}\r
209\r
210/**\r
211 Completes computation of the SHA-512 digest value.\r
212\r
213 Return FALSE to indicate this interface is not supported.\r
214\r
215 @param[in, out] Sha512Context Pointer to the SHA-512 context.\r
216 @param[out] HashValue Pointer to a buffer that receives the SHA-512 digest\r
217 value (64 bytes).\r
218\r
219 @retval FALSE This interface is not supported.\r
220\r
221**/\r
222BOOLEAN\r
223EFIAPI\r
224Sha512Final (\r
225 IN OUT VOID *Sha512Context,\r
226 OUT UINT8 *HashValue\r
227 )\r
228{\r
229 ASSERT (FALSE);\r
230 return FALSE;\r
231}\r