]>
Commit | Line | Data |
---|---|---|
532616bb | 1 | /** @file\r |
630f67dd | 2 | HMAC-SHA1 Wrapper Implementation which does not provide real capabilities.\r |
532616bb | 3 | \r |
630f67dd | 4 | Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r |
2009f6b4 | 5 | SPDX-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-SHA1 operations.\r | |
4c270243 QL |
13 | (NOTE: This API is deprecated.\r |
14 | Use HmacSha1New() / HmacSha1Free() for HMAC-SHA1 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 | |
21 | UINTN\r | |
22 | EFIAPI\r | |
23 | HmacSha1GetContextSize (\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-SHA1 use.\r | |
33 | \r | |
34 | Return NULL to indicate this interface is not supported.\r | |
35 | \r | |
36 | @return NULL This interface is not supported..\r | |
37 | \r | |
38 | **/\r | |
39 | VOID *\r | |
40 | EFIAPI\r | |
41 | HmacSha1New (\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] HmacSha1Ctx Pointer to the HMAC_CTX context to be released.\r | |
55 | \r | |
56 | **/\r | |
57 | VOID\r | |
58 | EFIAPI\r | |
59 | HmacSha1Free (\r | |
60 | IN VOID *HmacSha1Ctx\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 HmacSha1Context as HMAC-SHA1 context for\r | |
69 | subsequent use.\r | |
70 | \r | |
630f67dd | 71 | Return FALSE to indicate this interface is not supported.\r |
532616bb | 72 | \r |
73 | @param[out] HmacSha1Context Pointer to HMAC-SHA1 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 | |
80 | BOOLEAN\r | |
81 | EFIAPI\r | |
82 | HmacSha1Init (\r | |
83 | OUT VOID *HmacSha1Context,\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-SHA1 context.\r | |
94 | \r | |
95 | Return FALSE to indicate this interface is not supported.\r | |
96 | \r | |
97 | @param[in] HmacSha1Context Pointer to HMAC-SHA1 context being copied.\r | |
98 | @param[out] NewHmacSha1Context Pointer to new HMAC-SHA1 context.\r | |
99 | \r | |
100 | @retval FALSE This interface is not supported.\r | |
101 | \r | |
102 | **/\r | |
103 | BOOLEAN\r | |
104 | EFIAPI\r | |
105 | HmacSha1Duplicate (\r | |
106 | IN CONST VOID *HmacSha1Context,\r | |
107 | OUT VOID *NewHmacSha1Context\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-SHA1 context.\r | |
116 | \r | |
630f67dd | 117 | Return FALSE to indicate this interface is not supported.\r |
532616bb | 118 | \r |
119 | @param[in, out] HmacSha1Context Pointer to the HMAC-SHA1 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 | |
126 | BOOLEAN\r | |
127 | EFIAPI\r | |
128 | HmacSha1Update (\r | |
129 | IN OUT VOID *HmacSha1Context,\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-SHA1 digest value.\r | |
140 | \r | |
630f67dd | 141 | Return FALSE to indicate this interface is not supported.\r |
532616bb | 142 | \r |
143 | @param[in, out] HmacSha1Context Pointer to the HMAC-SHA1 context.\r | |
144 | @param[out] HmacValue Pointer to a buffer that receives the HMAC-SHA1 digest\r | |
145 | value (20 bytes).\r | |
146 | \r | |
147 | @retval FALSE This interface is not supported.\r | |
148 | \r | |
149 | **/\r | |
150 | BOOLEAN\r | |
151 | EFIAPI\r | |
152 | HmacSha1Final (\r | |
153 | IN OUT VOID *HmacSha1Context,\r | |
154 | OUT UINT8 *HmacValue\r | |
155 | )\r | |
156 | {\r | |
157 | ASSERT (FALSE);\r | |
158 | return FALSE;\r | |
159 | }\r |