1
/* Copyright (C) 2000 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
17
/* MD5.H - header file for MD5C.C
20
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
23
License to copy and use this software is granted provided that it
24
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
25
Algorithm" in all material mentioning or referencing this software
28
License is also granted to make and use derivative works provided
29
that such works are identified as "derived from the RSA Data
30
Security, Inc. MD5 Message-Digest Algorithm" in all material
31
mentioning or referencing the derived work.
33
RSA Data Security, Inc. makes no representations concerning either
34
the merchantability of this software or the suitability of this
35
software for any particular purpose. It is provided "as is"
36
without express or implied warranty of any kind.
38
These notices must be retained in any copies of any part of this
39
documentation and/or software.
42
/* GLOBAL.H - RSAREF types and constants
45
/* PROTOTYPES should be set to one if and only if the compiler supports
46
function argument prototyping.
47
The following makes PROTOTYPES default to 0 if it has not already
48
been defined with C compiler flags.
51
/* egcs 1.1.2 under linux didn't defined it.... :( */
54
#define PROTOTYPES 1 /* Assume prototypes */
57
/* POINTER defines a generic pointer type */
58
typedef unsigned char *POINTER;
60
/* UINT2 defines a two byte word */
61
typedef uint16 UINT2; /* Fix for MySQL / Alpha */
63
/* UINT4 defines a four byte word */
64
typedef uint32 UINT4; /* Fix for MySQL / Alpha */
66
/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
67
If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
68
returns an empty list.
71
#define PROTO_LIST(list) list
73
#define PROTO_LIST(list) ()
77
UINT4 state[4]; /* state (ABCD) */
78
UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
79
unsigned char buffer[64]; /* input buffer */
85
void my_MD5Init PROTO_LIST ((my_MD5_CTX *));
86
void my_MD5Update PROTO_LIST
87
((my_MD5_CTX *, unsigned char *, unsigned int));
88
void my_MD5Final PROTO_LIST ((unsigned char [16], my_MD5_CTX *));