]> git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5Null.c
bfe68ab916b8d6b1ed4497555752b5455d9acc19
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Hmac / CryptHmacMd5Null.c
1 /** @file
2 HMAC-MD5 Wrapper Implementation which does not provide real capabilities.
3
4 Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #include "InternalCryptLib.h"
16
17 /**
18 Retrieves the size, in bytes, of the context buffer required for HMAC-MD5 operations.
19 (NOTE: This API is deprecated.
20 Use HmacMd5New() / HmacMd5Free() for HMAC-MD5 Context operations.)
21
22 Return zero to indicate this interface is not supported.
23
24 @retval 0 This interface is not supported.
25
26 **/
27 UINTN
28 EFIAPI
29 HmacMd5GetContextSize (
30 VOID
31 )
32 {
33 ASSERT (FALSE);
34 return 0;
35 }
36
37 /**
38 Allocates and initializes one HMAC_CTX context for subsequent HMAC-MD5 use.
39
40 Return NULL to indicate this interface is not supported.
41
42 @retval NULL This interface is not supported.
43
44 **/
45 VOID *
46 EFIAPI
47 HmacMd5New (
48 VOID
49 )
50 {
51 ASSERT (FALSE);
52 return NULL;
53 }
54
55 /**
56 Release the specified HMAC_CTX context.
57
58 This function will do nothing.
59
60 @param[in] HmacMd5Ctx Pointer to the HMAC_CTX context to be released.
61
62 **/
63 VOID
64 EFIAPI
65 HmacMd5Free (
66 IN VOID *HmacMd5Ctx
67 )
68 {
69 ASSERT (FALSE);
70 return;
71 }
72
73 /**
74 Initializes user-supplied memory pointed by HmacMd5Context as HMAC-MD5 context for
75 subsequent use.
76
77 Return FALSE to indicate this interface is not supported.
78
79 @param[out] HmacMd5Context Pointer to HMAC-MD5 context being initialized.
80 @param[in] Key Pointer to the user-supplied key.
81 @param[in] KeySize Key size in bytes.
82
83 @retval FALSE This interface is not supported.
84
85 **/
86 BOOLEAN
87 EFIAPI
88 HmacMd5Init (
89 OUT VOID *HmacMd5Context,
90 IN CONST UINT8 *Key,
91 IN UINTN KeySize
92 )
93 {
94 ASSERT (FALSE);
95 return FALSE;
96 }
97
98 /**
99 Makes a copy of an existing HMAC-MD5 context.
100
101 Return FALSE to indicate this interface is not supported.
102
103 @param[in] HmacMd5Context Pointer to HMAC-MD5 context being copied.
104 @param[out] NewHmacMd5Context Pointer to new HMAC-MD5 context.
105
106 @retval FALSE This interface is not supported.
107
108 **/
109 BOOLEAN
110 EFIAPI
111 HmacMd5Duplicate (
112 IN CONST VOID *HmacMd5Context,
113 OUT VOID *NewHmacMd5Context
114 )
115 {
116 ASSERT (FALSE);
117 return FALSE;
118 }
119
120 /**
121 Digests the input data and updates HMAC-MD5 context.
122
123 Return FALSE to indicate this interface is not supported.
124
125 @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.
126 @param[in] Data Pointer to the buffer containing the data to be digested.
127 @param[in] DataSize Size of Data buffer in bytes.
128
129 @retval FALSE This interface is not supported.
130
131 **/
132 BOOLEAN
133 EFIAPI
134 HmacMd5Update (
135 IN OUT VOID *HmacMd5Context,
136 IN CONST VOID *Data,
137 IN UINTN DataSize
138 )
139 {
140 ASSERT (FALSE);
141 return FALSE;
142 }
143
144 /**
145 Completes computation of the HMAC-MD5 digest value.
146
147 Return FALSE to indicate this interface is not supported.
148
149 @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.
150 @param[out] HmacValue Pointer to a buffer that receives the HMAC-MD5 digest
151 value (16 bytes).
152
153 @retval FALSE This interface is not supported.
154
155 **/
156 BOOLEAN
157 EFIAPI
158 HmacMd5Final (
159 IN OUT VOID *HmacMd5Context,
160 OUT UINT8 *HmacValue
161 )
162 {
163 ASSERT (FALSE);
164 return FALSE;
165 }