root/oscgroups/trunk/md5.h
| Revision 7, 1.6 kB (checked in by ross, 3 years ago) | |
|---|---|
| |
| Line | |
|---|---|
| 1 | #ifndef INCLUDED_MD5_H |
| 2 | #define INCLUDED_MD5_H |
| 3 | /* from rfc1321 appendix A */ |
| 4 | |
| 5 | /* POINTER defines a generic pointer type */ |
| 6 | typedef unsigned char *POINTER; |
| 7 | |
| 8 | /* UINT2 defines a two byte word */ |
| 9 | typedef unsigned short int UINT2; |
| 10 | |
| 11 | /* UINT4 defines a four byte word */ |
| 12 | typedef unsigned long int UINT4; |
| 13 | |
| 14 | |
| 15 | /* MD5.H - header file for MD5C.C |
| 16 | */ |
| 17 | |
| 18 | /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All |
| 19 | rights reserved. |
| 20 | |
| 21 | License to copy and use this software is granted provided that it |
| 22 | is identified as the "RSA Data Security, Inc. MD5 Message-Digest |
| 23 | Algorithm" in all material mentioning or referencing this software |
| 24 | or this function. |
| 25 | |
| 26 | License is also granted to make and use derivative works provided |
| 27 | that such works are identified as "derived from the RSA Data |
| 28 | Security, Inc. MD5 Message-Digest Algorithm" in all material |
| 29 | mentioning or referencing the derived work. |
| 30 | |
| 31 | RSA Data Security, Inc. makes no representations concerning either |
| 32 | the merchantability of this software or the suitability of this |
| 33 | software for any particular purpose. It is provided "as is" |
| 34 | without express or implied warranty of any kind. |
| 35 | |
| 36 | These notices must be retained in any copies of any part of this |
| 37 | documentation and/or software. |
| 38 | */ |
| 39 | |
| 40 | /* MD5 context. */ |
| 41 | typedef struct { |
| 42 | UINT4 state[4]; /* state (ABCD) */ |
| 43 | UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ |
| 44 | unsigned char buffer[64]; /* input buffer */ |
| 45 | } MD5_CTX; |
| 46 | |
| 47 | void MD5Init(MD5_CTX *); |
| 48 | void MD5Update(MD5_CTX *, unsigned char *, unsigned int); |
| 49 | void MD5Final(unsigned char [16], MD5_CTX *); |
| 50 | |
| 51 | #endif /* INCLUDED_MD5_H */ |
Note: See TracBrowser for help on using the browser.
