]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/IScsiDxe/Md5.h
4 Copyright (c) 2004 - 2008, Intel Corporation
5 All rights reserved. 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
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.
26 #include <Uefi/UefiBaseType.h>
27 #include <Library/BaseLib.h>
28 #include <Library/NetLib.h>
30 #define MD5_HASHSIZE 16
32 typedef struct _MD5_CTX
{
35 UINT32 States
[MD5_HASHSIZE
/ sizeof (UINT32
)];
41 Initialize four 32-bits chaining variables and use them to do the Md5 transform.
43 @param Md5Ctx[in] the data structure of Md5
45 @retval EFI_SUCCESS initialization is ok
54 the external interface of Md5 algorithm
56 @param Md5Ctx[in] the data structure of storing the original data
57 segment and the final result.
59 @param Data[in] the data wanted to be transformed.
61 @param DataLen[in] the length of data.
63 @retval EFI_SUCCESS the transform is ok.
74 accumulate the MD5 value of every data segment and generate the finial
75 result according to MD5 algorithm
77 @param Md5Ctx[in] the data structure of storing the original data
78 segment and the final result.
80 @param HashVal[out] the final 128-bits output.
82 @retval EFI_SUCCESS the transform is ok.