]>
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"
14 Retrieves the size, in bytes, of the context buffer required for MD5 hash operations.
16 @return The size, in bytes, of the context buffer required for MD5 hash operations.
31 Initializes user-supplied memory pointed by Md5Context as MD5 hash context for
34 If Md5Context is NULL, then return FALSE.
36 @param[out] Md5Context Pointer to MD5 context being initialized.
38 @retval TRUE MD5 context initialization succeeded.
39 @retval FALSE MD5 context initialization failed.
53 Makes a copy of an existing MD5 context.
55 If Md5Context is NULL, then return FALSE.
56 If NewMd5Context is NULL, then return FALSE.
58 @param[in] Md5Context Pointer to MD5 context being copied.
59 @param[out] NewMd5Context Pointer to new MD5 context.
61 @retval TRUE MD5 context copy succeeded.
62 @retval FALSE MD5 context copy failed.
68 IN CONST VOID
*Md5Context
,
69 OUT VOID
*NewMd5Context
77 Digests the input data and updates MD5 context.
79 This function performs MD5 digest on a data buffer of the specified size.
80 It can be called multiple times to compute the digest of long or discontinuous data streams.
81 MD5 context should be already correctly intialized by Md5Init(), and should not be finalized
82 by Md5Final(). Behavior with invalid context is undefined.
84 If Md5Context is NULL, then return FALSE.
86 @param[in, out] Md5Context Pointer to the MD5 context.
87 @param[in] Data Pointer to the buffer containing the data to be hashed.
88 @param[in] DataSize Size of Data buffer in bytes.
90 @retval TRUE MD5 data digest succeeded.
91 @retval FALSE MD5 data digest failed.
97 IN OUT VOID
*Md5Context
,
107 Completes computation of the MD5 digest value.
109 This function completes MD5 hash computation and retrieves the digest value into
110 the specified memory. After this function has been called, the MD5 context cannot
112 MD5 context should be already correctly intialized by Md5Init(), and should not be
113 finalized by Md5Final(). Behavior with invalid MD5 context is undefined.
115 If Md5Context is NULL, then return FALSE.
116 If HashValue is NULL, then return FALSE.
118 @param[in, out] Md5Context Pointer to the MD5 context.
119 @param[out] HashValue Pointer to a buffer that receives the MD5 digest
122 @retval TRUE MD5 digest computation succeeded.
123 @retval FALSE MD5 digest computation failed.
129 IN OUT VOID
*Md5Context
,
138 Computes the MD5 message digest of a input data buffer.
140 This function performs the MD5 message digest of a given data buffer, and places
141 the digest value into the specified memory.
143 If this interface is not supported, then return FALSE.
145 @param[in] Data Pointer to the buffer containing the data to be hashed.
146 @param[in] DataSize Size of Data buffer in bytes.
147 @param[out] HashValue Pointer to a buffer that receives the MD5 digest
150 @retval TRUE MD5 digest computation succeeded.
151 @retval FALSE MD5 digest computation failed.
152 @retval FALSE This interface is not supported.