diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-09-30 13:19:18 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-09-30 13:19:18 +0000 |
commit | 19d9e9bcd3f2afa2df1bbf6534b88197c3521e07 (patch) | |
tree | 5611d7480611a5b668d8d4ccd5e1b354dcb86aa8 /md5.h | |
parent | 39838d3d977811f9814f4aee8097a8d5699129e7 (diff) | |
download | fetchmail-19d9e9bcd3f2afa2df1bbf6534b88197c3521e07.tar.gz fetchmail-19d9e9bcd3f2afa2df1bbf6534b88197c3521e07.tar.bz2 fetchmail-19d9e9bcd3f2afa2df1bbf6534b88197c3521e07.zip |
Got rid of BSD-classic licenses.
svn path=/trunk/; revision=3504
Diffstat (limited to 'md5.h')
-rw-r--r-- | md5.h | 69 |
1 files changed, 29 insertions, 40 deletions
@@ -1,42 +1,31 @@ -/* MD5.H - header file for MD5C.C +#ifndef MD5_H +#define MD5_H +#ifndef HEADER_MD5_H +/* Try to avoid clashes with OpenSSL */ +#define HEADER_MD5_H +#endif + +#if SIZEOF_INT == 4 +typedef unsigned int uint32; +#else +typedef unsigned long int uint32; +#endif + +struct MD5Context { + uint32 buf[4]; + uint32 bits[2]; + unsigned char in[64]; +}; + +void MD5Init(struct MD5Context *context); +void MD5Update(struct MD5Context *context, unsigned char const *buf, + unsigned len); +void MD5Final(unsigned char digest[16], struct MD5Context *context); +void MD5Transform(uint32 buf[4], uint32 const in[16]); + +/* + * This is needed to make RSAREF happy on some MS-DOS compilers. */ +typedef struct MD5Context MD5_CTX; -/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All -rights reserved. - -License to copy and use this software is granted provided that it -is identified as the "RSA Data Security, Inc. MD5 Message-Digest -Algorithm" in all material mentioning or referencing this software -or this function. - -License is also granted to make and use derivative works provided -that such works are identified as "derived from the RSA Data -Security, Inc. MD5 Message-Digest Algorithm" in all material -mentioning or referencing the derived work. - -RSA Data Security, Inc. makes no representations concerning either -the merchantability of this software or the suitability of this -software for any particular purpose. It is provided "as is" -without express or implied warranty of any kind. - -These notices must be retained in any copies of any part of this -documentation and/or software. - */ - -#ifndef MD5_H__ -#define MD5_H__ - -#include "md5global.h" - -/* MD5 context. */ -typedef struct { - UINT4 state[4]; /* state (ABCD) */ - UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ - unsigned char buffer[64]; /* input buffer */ -} MD5_CTX; - -void MD5Init PROTO_LIST ((MD5_CTX *)); -void MD5Update PROTO_LIST - ((MD5_CTX *, unsigned char *, unsigned int)); -void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); -#endif /* MD5_H__ */ +#endif /* !MD5_H */ |