md5file(3)

NAME
md5file - apply the RSADSI MD5 Message-Digest Algorithm to a stream

SYNTAX
#include <md5file.h> void md5file_clear(m);
void md5file_add(m,c);
void md5file_addn(m,b,len);
void md5file_hash(m,h); md5file *m;
unsigned char c;
unsigned char h[MD5FILE_HASHLEN];
unsigned char *b;
int len;

DESCRIPTION
md5file applies the MD5 hash function to a stream of unsigned characters. m points to an md5file structure, which accumulates the hash as data is fed in. Before feeding in any data you must call md5file_clear(m). Then, for each unsigned character c from the stream, call md5file_add(m,c). To process an array b of len unsigned characters, call md5file_addn(m,b,len). This is faster than calling md5file_add on each character in turn. md5file_hash(m,h) places the resulting hash into h, an array of bytes of length MD5FILE_HASHLEN. You may not use m after that without again calling md5file_clear(m). MD5FILE_HASHLEN equals 16.

COMPATIBILITY
Except for minor interface differences this should be completely compatible with Rivest's MD5 library.

DEFINITION
See RFC 1321.

VERSION
md5file 0.95, 8 July 1993.

AUTHOR
Derived from the RSA Data Security Incorporated MD5 Message-Digest Function, designed by Ron Rivest. This adaptation created by Daniel J. Bernstein.

SEE ALSO
mddriver(1)