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