]> git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacMd5Null.c
5de55bf0d592118e0706e995ed42a4b5ac3501aa
[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 - 2020, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include "InternalCryptLib.h"
10
11 /**
12 Allocates and initializes one HMAC_CTX context for subsequent HMAC-MD5 use.
13
14 Return NULL to indicate this interface is not supported.
15
16 @retval NULL This interface is not supported.
17
18 **/
19 VOID *
20 EFIAPI
21 HmacMd5New (
22 VOID
23 )
24 {
25 ASSERT (FALSE);
26 return NULL;
27 }
28
29 /**
30 Release the specified HMAC_CTX context.
31
32 This function will do nothing.
33
34 @param[in] HmacMd5Ctx Pointer to the HMAC_CTX context to be released.
35
36 **/
37 VOID
38 EFIAPI
39 HmacMd5Free (
40 IN VOID *HmacMd5Ctx
41 )
42 {
43 ASSERT (FALSE);
44 return;
45 }
46
47 /**
48 Set user-supplied key for subsequent use. It must be done before any
49 calling to HmacMd5Update().
50
51 Return FALSE to indicate this interface is not supported.
52
53 @param[out] HmacMd5Context Pointer to HMAC-MD5 context.
54 @param[in] Key Pointer to the user-supplied key.
55 @param[in] KeySize Key size in bytes.
56
57 @retval FALSE This interface is not supported.
58
59 **/
60 BOOLEAN
61 EFIAPI
62 HmacMd5SetKey (
63 OUT VOID *HmacMd5Context,
64 IN CONST UINT8 *Key,
65 IN UINTN KeySize
66 )
67 {
68 ASSERT (FALSE);
69 return FALSE;
70 }
71
72 /**
73 Makes a copy of an existing HMAC-MD5 context.
74
75 Return FALSE to indicate this interface is not supported.
76
77 @param[in] HmacMd5Context Pointer to HMAC-MD5 context being copied.
78 @param[out] NewHmacMd5Context Pointer to new HMAC-MD5 context.
79
80 @retval FALSE This interface is not supported.
81
82 **/
83 BOOLEAN
84 EFIAPI
85 HmacMd5Duplicate (
86 IN CONST VOID *HmacMd5Context,
87 OUT VOID *NewHmacMd5Context
88 )
89 {
90 ASSERT (FALSE);
91 return FALSE;
92 }
93
94 /**
95 Digests the input data and updates HMAC-MD5 context.
96
97 Return FALSE to indicate this interface is not supported.
98
99 @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.
100 @param[in] Data Pointer to the buffer containing the data to be digested.
101 @param[in] DataSize Size of Data buffer in bytes.
102
103 @retval FALSE This interface is not supported.
104
105 **/
106 BOOLEAN
107 EFIAPI
108 HmacMd5Update (
109 IN OUT VOID *HmacMd5Context,
110 IN CONST VOID *Data,
111 IN UINTN DataSize
112 )
113 {
114 ASSERT (FALSE);
115 return FALSE;
116 }
117
118 /**
119 Completes computation of the HMAC-MD5 digest value.
120
121 Return FALSE to indicate this interface is not supported.
122
123 @param[in, out] HmacMd5Context Pointer to the HMAC-MD5 context.
124 @param[out] HmacValue Pointer to a buffer that receives the HMAC-MD5 digest
125 value (16 bytes).
126
127 @retval FALSE This interface is not supported.
128
129 **/
130 BOOLEAN
131 EFIAPI
132 HmacMd5Final (
133 IN OUT VOID *HmacMd5Context,
134 OUT UINT8 *HmacValue
135 )
136 {
137 ASSERT (FALSE);
138 return FALSE;
139 }