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