OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
md5.h
1/* MD5.H - header file for MD5C.C
2 */
3
4/* Copyright (C) 1991, RSA Data Security, Inc. All rights reserved.
5
6 License to copy and use this software is granted provided that it
7 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
8 Algorithm" in all material mentioning or referencing this software
9 or this function.
10
11 License is also granted to make and use derivative works provided
12 that such works are identified as "derived from the RSA Data
13 Security, Inc. MD5 Message-Digest Algorithm" in all material
14 mentioning or referencing the derived work.
15
16 RSA Data Security, Inc. makes no representations concerning either
17 the merchantability of this software or the suitability of this
18 software for any particular purpose. It is provided "as is"
19 without express or implied warranty of any kind.
20
21 These notices must be retained in any copies of any part of this
22 documentation and/or software.
23 */
24
25/* GLOBAL.H - RSAREF types and constants
26 */
27
28/* PROTOTYPES should be set to one if and only if the compiler supports
29 function argument prototyping.
30The following makes PROTOTYPES default to 0 if it has not already
31
32 been defined with C compiler flags.
33 */
34
35#ifndef _MD5_H_
36#define _MD5_H_
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42#ifndef PROTOTYPES
43#define PROTOTYPES 1
44#endif
45
46/* POINTER defines a generic pointer type */
47typedef unsigned char *POINTER;
48
49/* UINT2 defines a two byte word */
50typedef unsigned short int UINT2;
51
52/* UINT4 defines a four byte word */
53typedef unsigned int UINT4;
54
55/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
56If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
57 returns an empty list.
58 */
59#if PROTOTYPES
60#define PROTO_LIST(list) list
61#else
62#define PROTO_LIST(list) ()
63#endif
64
65/* MD5 context. */
66typedef struct {
67 UINT4 state[4]; /* state (ABCD) */
68 UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
69 unsigned char buffer[64]; /* input buffer */
70} MD5_CTX;
71
72void MD5Init PROTO_LIST ((MD5_CTX *));
73void MD5Update PROTO_LIST ((MD5_CTX *, unsigned char *, unsigned int));
74void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
75void MD5Print PROTO_LIST ((unsigned char [16], char[33]));
76void MD5Digest PROTO_LIST ((unsigned char *, unsigned int, char[33]));
77#ifdef __cplusplus
78}
79#endif
80
81#endif
Definition md5.h:66