CryptoPkg/TlsLib: rewrite TlsSetCipherList()
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibRuntimeCryptProtocol / Hash / CryptSha1Null.c
CommitLineData
532616bb 1/** @file\r
2 SHA-1 Digest Wrapper Implementation which does not provide real capabilities.\r
3\r
4Copyright (c) 2012, 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/**\r
19 Retrieves the size, in bytes, of the context buffer required for SHA-1 hash operations.\r
20\r
21 Return zero to indicate this interface is not supported.\r
22\r
23 @return The size, in bytes, of the context buffer required for SHA-1 hash operations.\r
24 @retval 0 This interface is not supported.\r
25\r
26**/\r
27UINTN\r
28EFIAPI\r
29Sha1GetContextSize (\r
30 VOID\r
31 )\r
32{\r
33 ASSERT (FALSE);\r
34 return 0; \r
35}\r
36\r
37/**\r
38 Initializes user-supplied memory pointed by Sha1Context as SHA-1 hash context for\r
39 subsequent use.\r
40\r
41 Return FALSE to indicate this interface is not supported.\r
42 \r
43 @param[out] Sha1Context Pointer to SHA-1 context being initialized.\r
44\r
45 @retval FALSE This interface is not supported.\r
46\r
47**/\r
48BOOLEAN\r
49EFIAPI\r
50Sha1Init (\r
51 OUT VOID *Sha1Context\r
52 )\r
53{\r
54 ASSERT (FALSE);\r
55 return FALSE;\r
56}\r
57\r
58/**\r
59 Makes a copy of an existing SHA-1 context.\r
60\r
61 Return FALSE to indicate this interface is not supported.\r
62\r
63 @param[in] Sha1Context Pointer to SHA-1 context being copied.\r
64 @param[out] NewSha1Context Pointer to new SHA-1 context.\r
65\r
66 @retval FALSE This interface is not supported.\r
67\r
68**/\r
69BOOLEAN\r
70EFIAPI\r
71Sha1Duplicate (\r
72 IN CONST VOID *Sha1Context,\r
73 OUT VOID *NewSha1Context\r
74 )\r
75{\r
76 ASSERT (FALSE);\r
77 return FALSE;\r
78}\r
79\r
80/**\r
81 Digests the input data and updates SHA-1 context.\r
82\r
83 Return FALSE to indicate this interface is not supported.\r
84\r
85 @param[in, out] Sha1Context Pointer to the SHA-1 context.\r
86 @param[in] Data Pointer to the buffer containing the data to be hashed.\r
87 @param[in] DataSize Size of Data buffer in bytes.\r
88\r
89 @retval FALSE This interface is not supported.\r
90\r
91**/\r
92BOOLEAN\r
93EFIAPI\r
94Sha1Update (\r
95 IN OUT VOID *Sha1Context,\r
96 IN CONST VOID *Data,\r
97 IN UINTN DataSize\r
98 )\r
99{\r
100 ASSERT (FALSE);\r
101 return FALSE;\r
102}\r
103\r
104/**\r
105 Completes computation of the SHA-1 digest value.\r
106\r
107 Return FALSE to indicate this interface is not supported.\r
108\r
109 @param[in, out] Sha1Context Pointer to the SHA-1 context.\r
110 @param[out] HashValue Pointer to a buffer that receives the SHA-1 digest\r
111 value (20 bytes).\r
112\r
113 @retval FALSE This interface is not supported.\r
114\r
115**/\r
116BOOLEAN\r
117EFIAPI\r
118Sha1Final (\r
119 IN OUT VOID *Sha1Context,\r
120 OUT UINT8 *HashValue\r
121 )\r
122{\r
123 ASSERT (FALSE);\r
124 return FALSE;\r
125}\r