]> git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/BaseCryptLibNull/Hash/CryptMd5Null.c
CryptoPkg: Apply uncrustify changes
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibNull / Hash / CryptMd5Null.c
1 /** @file
2
3 MD5 Digest Wrapper Null Implementation.
4
5 Copyright (c) Microsoft Corporation. All rights reserved.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #include "InternalCryptLib.h"
11
12 /**
13 Retrieves the size, in bytes, of the context buffer required for MD5 hash operations.
14
15 @return The size, in bytes, of the context buffer required for MD5 hash operations.
16
17 **/
18 UINTN
19 EFIAPI
20 Md5GetContextSize (
21 VOID
22 )
23 {
24 ASSERT (FALSE);
25 return 0;
26 }
27
28 /**
29 Initializes user-supplied memory pointed by Md5Context as MD5 hash context for
30 subsequent use.
31
32 If Md5Context is NULL, then return FALSE.
33
34 @param[out] Md5Context Pointer to MD5 context being initialized.
35
36 @retval TRUE MD5 context initialization succeeded.
37 @retval FALSE MD5 context initialization failed.
38
39 **/
40 BOOLEAN
41 EFIAPI
42 Md5Init (
43 OUT VOID *Md5Context
44 )
45 {
46 ASSERT (FALSE);
47 return FALSE;
48 }
49
50 /**
51 Makes a copy of an existing MD5 context.
52
53 If Md5Context is NULL, then return FALSE.
54 If NewMd5Context is NULL, then return FALSE.
55
56 @param[in] Md5Context Pointer to MD5 context being copied.
57 @param[out] NewMd5Context Pointer to new MD5 context.
58
59 @retval TRUE MD5 context copy succeeded.
60 @retval FALSE MD5 context copy failed.
61
62 **/
63 BOOLEAN
64 EFIAPI
65 Md5Duplicate (
66 IN CONST VOID *Md5Context,
67 OUT VOID *NewMd5Context
68 )
69 {
70 ASSERT (FALSE);
71 return FALSE;
72 }
73
74 /**
75 Digests the input data and updates MD5 context.
76
77 This function performs MD5 digest on a data buffer of the specified size.
78 It can be called multiple times to compute the digest of long or discontinuous data streams.
79 MD5 context should be already correctly intialized by Md5Init(), and should not be finalized
80 by Md5Final(). Behavior with invalid context is undefined.
81
82 If Md5Context is NULL, then return FALSE.
83
84 @param[in, out] Md5Context Pointer to the MD5 context.
85 @param[in] Data Pointer to the buffer containing the data to be hashed.
86 @param[in] DataSize Size of Data buffer in bytes.
87
88 @retval TRUE MD5 data digest succeeded.
89 @retval FALSE MD5 data digest failed.
90
91 **/
92 BOOLEAN
93 EFIAPI
94 Md5Update (
95 IN OUT VOID *Md5Context,
96 IN CONST VOID *Data,
97 IN UINTN DataSize
98 )
99 {
100 ASSERT (FALSE);
101 return FALSE;
102 }
103
104 /**
105 Completes computation of the MD5 digest value.
106
107 This function completes MD5 hash computation and retrieves the digest value into
108 the specified memory. After this function has been called, the MD5 context cannot
109 be used again.
110 MD5 context should be already correctly intialized by Md5Init(), and should not be
111 finalized by Md5Final(). Behavior with invalid MD5 context is undefined.
112
113 If Md5Context is NULL, then return FALSE.
114 If HashValue is NULL, then return FALSE.
115
116 @param[in, out] Md5Context Pointer to the MD5 context.
117 @param[out] HashValue Pointer to a buffer that receives the MD5 digest
118 value (16 bytes).
119
120 @retval TRUE MD5 digest computation succeeded.
121 @retval FALSE MD5 digest computation failed.
122
123 **/
124 BOOLEAN
125 EFIAPI
126 Md5Final (
127 IN OUT VOID *Md5Context,
128 OUT UINT8 *HashValue
129 )
130 {
131 ASSERT (FALSE);
132 return FALSE;
133 }
134
135 /**
136 Computes the MD5 message digest of a input data buffer.
137
138 This function performs the MD5 message digest of a given data buffer, and places
139 the digest value into the specified memory.
140
141 If this interface is not supported, then return FALSE.
142
143 @param[in] Data Pointer to the buffer containing the data to be hashed.
144 @param[in] DataSize Size of Data buffer in bytes.
145 @param[out] HashValue Pointer to a buffer that receives the MD5 digest
146 value (16 bytes).
147
148 @retval TRUE MD5 digest computation succeeded.
149 @retval FALSE MD5 digest computation failed.
150 @retval FALSE This interface is not supported.
151
152 **/
153 BOOLEAN
154 EFIAPI
155 Md5HashAll (
156 IN CONST VOID *Data,
157 IN UINTN DataSize,
158 OUT UINT8 *HashValue
159 )
160 {
161 ASSERT (FALSE);
162 return FALSE;
163 }