Blame libmd5/md5.h

Packit Service 50c9f2
/*
Packit Service 50c9f2
 * This is the header file for the MD5 message-digest algorithm.
Packit Service 50c9f2
 * The algorithm is due to Ron Rivest.  This code was
Packit Service 50c9f2
 * written by Colin Plumb in 1993, no copyright is claimed.
Packit Service 50c9f2
 * This code is in the public domain; do with it what you wish.
Packit Service 50c9f2
 *
Packit Service 50c9f2
 * Equivalent code is available from RSA Data Security, Inc.
Packit Service 50c9f2
 * This code has been tested against that, and is equivalent,
Packit Service 50c9f2
 * except that you don't need to include two pages of legalese
Packit Service 50c9f2
 * with every copy.
Packit Service 50c9f2
 *
Packit Service 50c9f2
 * To compute the message digest of a chunk of bytes, declare an
Packit Service 50c9f2
 * MD5Context structure, pass it to MD5Init, call MD5Update as
Packit Service 50c9f2
 * needed on buffers full of bytes, and then call MD5Final, which
Packit Service 50c9f2
 * will fill a supplied 16-byte array with the digest.
Packit Service 50c9f2
 *
Packit Service 50c9f2
 * Changed so as no longer to depend on Colin Plumb's `usual.h'
Packit Service 50c9f2
 * header definitions; now uses stuff from dpkg's config.h
Packit Service 50c9f2
 *  - Ian Jackson <ian@chiark.greenend.org.uk>.
Packit Service 50c9f2
 * Still in the public domain.
Packit Service 50c9f2
 */
Packit Service 50c9f2
Packit Service 50c9f2
#ifndef MD5_H
Packit Service 50c9f2
#define MD5_H
Packit Service 50c9f2
Packit Service 50c9f2
#ifdef __cplusplus
Packit Service 50c9f2
extern "C" {
Packit Service 50c9f2
#endif
Packit Service 50c9f2
Packit Service 50c9f2
#include "md5_loc.h"
Packit Service 50c9f2
Packit Service 50c9f2
#define md5byte unsigned char
Packit Service 50c9f2
Packit Service 50c9f2
//#if SIZEOF_UNSIGNED_LONG==4
Packit Service 50c9f2
//# define UWORD32 unsigned long
Packit Service 50c9f2
//#elif SIZEOF_UNSIGNED_INT==4
Packit Service 50c9f2
//#else
Packit Service 50c9f2
//# error I do not know what to use for a UWORD32.
Packit Service 50c9f2
//#endif
Packit Service 50c9f2
Packit Service 50c9f2
struct MD5Context {
Packit Service 50c9f2
	UWORD32 buf[4];
Packit Service 50c9f2
	UWORD32 bytes[2];
Packit Service 50c9f2
	UWORD32 in[16];
Packit Service 50c9f2
};
Packit Service 50c9f2
Packit Service 50c9f2
void MD5Init(struct MD5Context *context);
Packit Service 50c9f2
void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
Packit Service 50c9f2
void MD5Final(unsigned char digest[16], struct MD5Context *context);
Packit Service 50c9f2
void MD5Buffer (const unsigned char *buf,unsigned int len,unsigned char sig[16]);
Packit Service 50c9f2
void MD5SigToString(unsigned char sig[16],char *str,int len);
Packit Service 50c9f2
Packit Service 50c9f2
#ifdef __cplusplus
Packit Service 50c9f2
}
Packit Service 50c9f2
#endif
Packit Service 50c9f2
Packit Service 50c9f2
#endif /* !MD5_H */