Main Page | Class List | File List | Class Members

ace-radius/md5.h

00001 #ifndef __MD5_H_ 00002 #define __MD5_H_ 00003 00004 /* 00005 * This code implements the MD5 message-digest algorithm. 00006 * The algorithm is due to Ron Rivest. This code was 00007 * written by Colin Plumb in 1993, no copyright is claimed. 00008 * This code is in the public domain; do with it what you wish. 00009 * 00010 * Equivalent code is available from RSA Data Security, Inc. 00011 * This code has been tested against that, and is equivalent, 00012 * except that you don't need to include two pages of legalese 00013 * with every copy. 00014 * 00015 * To compute the message digest of a chunk of bytes, declare an 00016 * MD5Context structure, pass it to MD5Init, call MD5Update as 00017 * needed on buffers full of bytes, and then call MD5Final, which 00018 * will fill a supplied 16-byte array with the digest. 00019 * 00020 * Changes made by Alex Agranov: 00021 * - use types from inttypes.h header for multi-platform support 00022 * - support both big-endian and little-endian architectures 00023 * 00024 */ 00025 00026 #ifdef _MSC_VER 00027 #include "Radius.h" 00028 #else 00029 #include <inttypes.h> 00030 #endif 00031 00032 typedef struct MD5Context 00033 { 00034 uint32_t buf[4]; 00035 uint32_t bits[2]; 00036 unsigned char in[64]; 00037 } MD5_CTX; 00038 00039 extern void MD5Init(struct MD5Context * ctx); 00040 extern void MD5Update(struct MD5Context *ctx, unsigned char *buf, uint32_t len); 00041 extern void MD5Final(unsigned char digest[16], struct MD5Context *ctx); 00042 extern void MD5Transform(uint32_t buf[4], uint32_t in[16]); 00043 00044 extern void MD5Calc(unsigned char *output,unsigned char *input, uint32_t len); 00045 00046 #endif /* __MD5_H_ */ 00047

Generated on Tue Aug 11 18:35:06 2009 for ace-radius by doxygen 1.3.7-20040704