]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/IScsiDxe/Md5.h
clean up the un-suitable ';' location when declaring the functions.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / Md5.h
1 /** @file
2 Header file for Md5
3
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
9
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.
12
13 Module Name:
14
15 Md5.h
16
17 Abstract:
18
19 Header file for Md5
20
21 **/
22
23 #ifndef _MD5_H_
24 #define _MD5_H_
25
26 #include <Uefi/UefiBaseType.h>
27 #include <Library/BaseLib.h>
28 #include <Library/NetLib.h>
29
30 #define MD5_HASHSIZE 16
31
32 typedef struct _MD5_CTX {
33 EFI_STATUS Status;
34 UINT64 Length;
35 UINT32 States[MD5_HASHSIZE / sizeof (UINT32)];
36 UINT8 M[64];
37 UINTN Count;
38 } MD5_CTX;
39
40 /**
41 Initialize four 32-bits chaining variables and use them to do the Md5 transform.
42
43 @param Md5Ctx[in] the data structure of Md5
44
45 @retval EFI_SUCCESS initialization is ok
46
47 **/
48 EFI_STATUS
49 MD5Init (
50 IN MD5_CTX *Md5Ctx
51 );
52
53 /**
54 the external interface of Md5 algorithm
55
56 @param Md5Ctx[in] the data structure of storing the original data
57 segment and the final result.
58
59 @param Data[in] the data wanted to be transformed.
60
61 @param DataLen[in] the length of data.
62
63 @retval EFI_SUCCESS the transform is ok.
64
65 **/
66 EFI_STATUS
67 MD5Update (
68 IN MD5_CTX *Md5Ctx,
69 IN VOID *Data,
70 IN UINTN DataLen
71 );
72
73 /**
74 accumulate the MD5 value of every data segment and generate the finial
75 result according to MD5 algorithm
76
77 @param Md5Ctx[in] the data structure of storing the original data
78 segment and the final result.
79
80 @param HashVal[out] the final 128-bits output.
81
82 @retval EFI_SUCCESS the transform is ok.
83
84 **/
85 EFI_STATUS
86 MD5Final (
87 IN MD5_CTX *Md5Ctx,
88 OUT UINT8 *HashVal
89 );
90
91 #endif // _MD5_H