]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5Null.c
CryptoPkg: Clean up source files
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Hmac / CryptHmacMd5Null.c
CommitLineData
532616bb 1/** @file\r
2 HMAC-MD5 Wrapper Implementation which does not provide real capabilities.\r
3\r
630f67dd 4Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
532616bb 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 HMAC-MD5 operations.\r
4c270243
QL
19 (NOTE: This API is deprecated.\r
20 Use HmacMd5New() / HmacMd5Free() for HMAC-MD5 Context operations.)\r
532616bb 21\r
22 Return zero to indicate this interface is not supported.\r
23\r
24 @retval 0 This interface is not supported.\r
25\r
26**/\r
27UINTN\r
28EFIAPI\r
29HmacMd5GetContextSize (\r
30 VOID\r
31 )\r
32{\r
33 ASSERT (FALSE);\r
34 return 0;\r
35}\r
36\r
4c270243
QL
37/**\r
38 Allocates and initializes one HMAC_CTX context for subsequent HMAC-MD5 use.\r
39\r
40 Return NULL to indicate this interface is not supported.\r
41\r
42 @retval NULL This interface is not supported.\r
43\r
44**/\r
45VOID *\r
46EFIAPI\r
47HmacMd5New (\r
48 VOID\r
49 )\r
50{\r
51 ASSERT (FALSE);\r
52 return NULL;\r
53}\r
54\r
55/**\r
56 Release the specified HMAC_CTX context.\r
57\r
58 This function will do nothing.\r
59\r
60 @param[in] HmacMd5Ctx Pointer to the HMAC_CTX context to be released.\r
61\r
62**/\r
63VOID\r
64EFIAPI\r
65HmacMd5Free (\r
66 IN VOID *HmacMd5Ctx\r
67 )\r
68{\r
69 ASSERT (FALSE);\r
70 return;\r
71}\r
72\r
532616bb 73/**\r
74 Initializes user-supplied memory pointed by HmacMd5Context as HMAC-MD5 context for\r
630f67dd 75 subsequent use.\r
532616bb 76\r
630f67dd 77 Return FALSE to indicate this interface is not supported.\r
532616bb 78\r
79 @param[out] HmacMd5Context Pointer to HMAC-MD5 context being initialized.\r
80 @param[in] Key Pointer to the user-supplied key.\r
81 @param[in] KeySize Key size in bytes.\r
82\r
83 @retval FALSE This interface is not supported.\r
84\r
85**/\r
86BOOLEAN\r
87EFIAPI\r
88HmacMd5Init (\r
89 OUT VOID *HmacMd5Context,\r
90 IN CONST UINT8 *Key,\r
91 IN UINTN KeySize\r
92 )\r
93{\r
94 ASSERT (FALSE);\r
95 return FALSE;\r
96}\r
97\r
98/**\r
99 Makes a copy of an existing HMAC-MD5 context.\r
100\r
101 Return FALSE to indicate this interface is not supported.\r
102\r
103 @param[in] HmacMd5Context Pointer to HMAC-MD5 context being copied.\r
104 @param[out] NewHmacMd5Context Pointer to new HMAC-MD5 context.\r
105\r
106 @retval FALSE This interface is not supported.\r
107\r
108**/\r
109BOOLEAN\r
110EFIAPI\r
111HmacMd5Duplicate (\r
112 IN CONST VOID *HmacMd5Context,\r
113 OUT VOID *NewHmacMd5Context\r
114 )\r
115{\r
116 ASSERT (FALSE);\r
117 return FALSE;\r
118}\r
119\r
120/**\r
121 Digests the input data and updates HMAC-MD5 context.\r
122\r
123 Return FALSE to indicate this interface is not supported.\r
124\r
125 @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.\r
126 @param[in] Data Pointer to the buffer containing the data to be digested.\r
127 @param[in] DataSize Size of Data buffer in bytes.\r
128\r
129 @retval FALSE This interface is not supported.\r
130\r
131**/\r
132BOOLEAN\r
133EFIAPI\r
134HmacMd5Update (\r
135 IN OUT VOID *HmacMd5Context,\r
136 IN CONST VOID *Data,\r
137 IN UINTN DataSize\r
138 )\r
139{\r
140 ASSERT (FALSE);\r
141 return FALSE;\r
142}\r
143\r
144/**\r
145 Completes computation of the HMAC-MD5 digest value.\r
146\r
147 Return FALSE to indicate this interface is not supported.\r
148\r
149 @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.\r
150 @param[out] HmacValue Pointer to a buffer that receives the HMAC-MD5 digest\r
151 value (16 bytes).\r
152\r
153 @retval FALSE This interface is not supported.\r
154\r
155**/\r
156BOOLEAN\r
157EFIAPI\r
158HmacMd5Final (\r
159 IN OUT VOID *HmacMd5Context,\r
160 OUT UINT8 *HmacValue\r
161 )\r
162{\r
163 ASSERT (FALSE);\r
164 return FALSE;\r
165}\r