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