blob: f63d74ee32d094b7f2f8231598ecd47a55ce5f80 [file] [log] [blame]
developerfd2abaf2022-05-06 13:09:53 +08001// SPDX-License-Identifier: GPL-2.0
2
3/*
4 ***********************************************************************
5 ** md5.h -- header file for implementation of MD5 **
6 ** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
7 ** Created: 2/17/90 RLR **
8 ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
9 ** Revised (for MD5): RLR 4/27/91 **
10 ** -- G modified to have y&~z instead of y&z **
11 ** -- FF, GG, HH modified to add in last register done **
12 ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
13 ** -- distinct additive constant for each step **
14 ** -- round 4 added, working mod 7 **
15 ***********************************************************************
16 */
17
18/*
19 ***********************************************************************
20 ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
21 ** **
22 ** License to copy and use this software is granted provided that **
23 ** it is identified as the "RSA Data Security, Inc. MD5 Message- **
24 ** Digest Algorithm" in all material mentioning or referencing this **
25 ** software or this function. **
26 ** **
27 ** License is also granted to make and use derivative works **
28 ** provided that such works are identified as "derived from the RSA **
29 ** Data Security, Inc. MD5 Message-Digest Algorithm" in all **
30 ** material mentioning or referencing the derived work. **
31 ** **
32 ** RSA Data Security, Inc. makes no representations concerning **
33 ** either the merchantability of this software or the suitability **
34 ** of this software for any particular purpose. It is provided "as **
35 ** is" without express or implied warranty of any kind. **
36 ** **
37 ** These notices must be retained in any copies of any part of this **
38 ** documentation and/or software. **
39 ***********************************************************************
40 */
41
42#ifndef __MD5_INCLUDE__
43
44/* typedef a 32-bit type */
45#ifdef _LP64
46typedef unsigned int UINT4;
47typedef int INT4;
48#else
49typedef unsigned long UINT4;
50typedef long INT4;
51#endif
52#define _UINT4_T
53
54/* Data structure for MD5 (Message-Digest) computation */
55typedef struct {
56 UINT4 i[2]; /* number of _bits_ handled mod 2^64 */
57 UINT4 buf[4]; /* scratch buffer */
58 unsigned char in[64]; /* input buffer */
59 unsigned char digest[16]; /* actual digest after MD5Final call */
60} MD5_CTX;
61
62void MD5_Init ();
63void MD5_Update ();
64void MD5_Final ();
65
66#define __MD5_INCLUDE__
67#endif /* __MD5_INCLUDE__ */