]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256Null.c
CryptoPkg: Fix typos in comments
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Hmac / CryptHmacSha256Null.c
CommitLineData
72009c62
QL
1/** @file\r
2 HMAC-SHA256 Wrapper Implementation which does not provide real capabilities.\r
3\r
4Copyright (c) 2016, 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-SHA256 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
27HmacSha256GetContextSize (\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 HmacSha256Context as HMAC-SHA256 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] HmacSha256Context Pointer to HMAC-SHA256 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
50HmacSha256Init (\r
51 OUT VOID *HmacSha256Context,\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-SHA256 context.\r
62\r
63 Return FALSE to indicate this interface is not supported.\r
64\r
65 @param[in] HmacSha256Context Pointer to HMAC-SHA256 context being copied.\r
66 @param[out] NewHmacSha256Context Pointer to new HMAC-SHA256 context.\r
67\r
68 @retval FALSE This interface is not supported.\r
69\r
70**/\r
71BOOLEAN\r
72EFIAPI\r
73HmacSha256Duplicate (\r
74 IN CONST VOID *HmacSha256Context,\r
75 OUT VOID *NewHmacSha256Context\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-SHA256 context.\r
84\r
85 Return FALSE to indicate this interface is not supported.\r
86\r
87 @param[in, out] HmacSha256Context Pointer to the HMAC-SHA256 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
96HmacSha256Update (\r
97 IN OUT VOID *HmacSha256Context,\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-SHA256 digest value.\r
108\r
109 Return FALSE to indicate this interface is not supported.\r
110\r
111 @param[in, out] HmacSha256Context Pointer to the HMAC-SHA256 context.\r
112 @param[out] HashValue Pointer to a buffer that receives the HMAC-SHA256 digest\r
113 value (32 bytes).\r
114\r
115 @retval FALSE This interface is not supported.\r
116\r
117**/\r
118BOOLEAN\r
119EFIAPI\r
120HmacSha256Final (\r
121 IN OUT VOID *HmacSha256Context,\r
122 OUT UINT8 *HmacValue\r
123 )\r
124{\r
125 ASSERT (FALSE);\r
126 return FALSE;\r
127}\r