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