]>
Commit | Line | Data |
---|---|---|
83215298 GL |
1 | /** @file\r |
2 | HMAC-MD5 Wrapper Implementation which does not provide real capabilities.\r | |
3 | \r | |
d064bd7e | 4 | Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.<BR>\r |
83215298 GL |
5 | This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT 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 | |
d064bd7e GL |
19 | (NOTE: This API is deprecated.\r |
20 | Use HmacMd5New() / HmacMd5Free() for HMAC-MD5 Context operations.)\r | |
83215298 GL |
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 | |
27 | UINTN\r | |
28 | EFIAPI\r | |
29 | HmacMd5GetContextSize (\r | |
30 | VOID\r | |
31 | )\r | |
32 | {\r | |
33 | ASSERT (FALSE);\r | |
34 | return 0;\r | |
35 | }\r | |
36 | \r | |
d064bd7e GL |
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 | |
45 | VOID *\r | |
46 | EFIAPI\r | |
47 | HmacMd5New (\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 | |
63 | VOID\r | |
64 | EFIAPI\r | |
65 | HmacMd5Free (\r | |
66 | IN VOID *HmacMd5Ctx\r | |
67 | )\r | |
68 | {\r | |
69 | ASSERT (FALSE);\r | |
70 | return;\r | |
71 | }\r | |
72 | \r | |
83215298 GL |
73 | /**\r |
74 | Initializes user-supplied memory pointed by HmacMd5Context as HMAC-MD5 context for\r | |
75 | subsequent use. \r | |
76 | \r | |
77 | Return FALSE to indicate this interface is not supported. \r | |
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 | |
86 | BOOLEAN\r | |
87 | EFIAPI\r | |
88 | HmacMd5Init (\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 | |
109 | BOOLEAN\r | |
110 | EFIAPI\r | |
111 | HmacMd5Duplicate (\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 | |
132 | BOOLEAN\r | |
133 | EFIAPI\r | |
134 | HmacMd5Update (\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 | |
156 | BOOLEAN\r | |
157 | EFIAPI\r | |
158 | HmacMd5Final (\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 |