PageRenderTime 78ms CodeModel.GetById 74ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/External/Mysql-5.0/include/my_md5.h

http://awoe.googlecode.com/
C++ Header | 92 lines | 26 code | 13 blank | 53 comment | 0 complexity | fb25c123f9d70a47c31ee70fb94bac00 MD5 | raw file
 1/* Copyright (C) 2000 MySQL AB
 2
 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.
 6
 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.
11
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 */
15
16
17/* MD5.H - header file for MD5C.C
18 */
19
20/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
21rights reserved.
22
23License to copy and use this software is granted provided that it
24is identified as the "RSA Data Security, Inc. MD5 Message-Digest
25Algorithm" in all material mentioning or referencing this software
26or this function.
27
28License is also granted to make and use derivative works provided
29that such works are identified as "derived from the RSA Data
30Security, Inc. MD5 Message-Digest Algorithm" in all material
31mentioning or referencing the derived work.
32
33RSA Data Security, Inc. makes no representations concerning either
34the merchantability of this software or the suitability of this
35software for any particular purpose. It is provided "as is"
36without express or implied warranty of any kind.
37
38These notices must be retained in any copies of any part of this
39documentation and/or software.
40 */
41
42/* GLOBAL.H - RSAREF types and constants
43 */
44
45/* PROTOTYPES should be set to one if and only if the compiler supports
46  function argument prototyping.
47The following makes PROTOTYPES default to 0 if it has not already
48  been defined with C compiler flags.
49 */
50
51/* egcs 1.1.2 under linux didn't defined it.... :( */
52
53#ifndef PROTOTYPES
54#define PROTOTYPES 1				/* Assume prototypes */
55#endif
56
57/* POINTER defines a generic pointer type */
58typedef unsigned char *POINTER;
59
60/* UINT2 defines a two byte word */
61typedef uint16 UINT2;				/* Fix for MySQL / Alpha */
62
63/* UINT4 defines a four byte word */
64typedef uint32 UINT4;				/* Fix for MySQL / Alpha */
65
66/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
67If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
68  returns an empty list.
69 */
70#if PROTOTYPES
71#define PROTO_LIST(list) list
72#else
73#define PROTO_LIST(list) ()
74#endif
75/* MD5 context. */
76typedef struct {
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 */
80} my_MD5_CTX;
81
82#ifdef __cplusplus
83extern "C" {
84#endif
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 *));
89
90#ifdef __cplusplus
91}
92#endif