~stewart/drizzle/embedded-innodb-create-select-transaction-arrgh

« back to all changes in this revision

Viewing changes to include/my_md5.h

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
21
rights reserved.
 
22
 
 
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
 
26
or this function.
 
27
 
 
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.
 
32
 
 
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.
 
37
 
 
38
These notices must be retained in any copies of any part of this
 
39
documentation 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.
 
47
The 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 */
 
58
typedef unsigned char *POINTER;
 
59
 
 
60
/* UINT2 defines a two byte word */
 
61
typedef uint16 UINT2;                           /* Fix for MySQL / Alpha */
 
62
 
 
63
/* UINT4 defines a four byte word */
 
64
typedef uint32 UINT4;                           /* Fix for MySQL / Alpha */
 
65
 
 
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.
 
69
 */
 
70
#if PROTOTYPES
 
71
#define PROTO_LIST(list) list
 
72
#else
 
73
#define PROTO_LIST(list) ()
 
74
#endif
 
75
/* MD5 context. */
 
76
typedef 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
 
83
extern "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