]>
git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/BaseCryptLibNull/Hash/CryptMd5Null.c
3 MD5 Digest Wrapper Null Implementation.
5 Copyright (c) Microsoft Corporation. All rights reserved.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include "InternalCryptLib.h"
13 Retrieves the size, in bytes, of the context buffer required for MD5 hash operations.
15 @return The size, in bytes, of the context buffer required for MD5 hash operations.
29 Initializes user-supplied memory pointed by Md5Context as MD5 hash context for
32 If Md5Context is NULL, then return FALSE.
34 @param[out] Md5Context Pointer to MD5 context being initialized.
36 @retval TRUE MD5 context initialization succeeded.
37 @retval FALSE MD5 context initialization failed.
51 Makes a copy of an existing MD5 context.
53 If Md5Context is NULL, then return FALSE.
54 If NewMd5Context is NULL, then return FALSE.
56 @param[in] Md5Context Pointer to MD5 context being copied.
57 @param[out] NewMd5Context Pointer to new MD5 context.
59 @retval TRUE MD5 context copy succeeded.
60 @retval FALSE MD5 context copy failed.
66 IN CONST VOID
*Md5Context
,
67 OUT VOID
*NewMd5Context
75 Digests the input data and updates MD5 context.
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.
82 If Md5Context is NULL, then return FALSE.
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.
88 @retval TRUE MD5 data digest succeeded.
89 @retval FALSE MD5 data digest failed.
95 IN OUT VOID
*Md5Context
,
105 Completes computation of the MD5 digest value.
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
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.
113 If Md5Context is NULL, then return FALSE.
114 If HashValue is NULL, then return FALSE.
116 @param[in, out] Md5Context Pointer to the MD5 context.
117 @param[out] HashValue Pointer to a buffer that receives the MD5 digest
120 @retval TRUE MD5 digest computation succeeded.
121 @retval FALSE MD5 digest computation failed.
127 IN OUT VOID
*Md5Context
,
136 Computes the MD5 message digest of a input data buffer.
138 This function performs the MD5 message digest of a given data buffer, and places
139 the digest value into the specified memory.
141 If this interface is not supported, then return FALSE.
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
148 @retval TRUE MD5 digest computation succeeded.
149 @retval FALSE MD5 digest computation failed.
150 @retval FALSE This interface is not supported.