.TH MD5 3 "Mastodon Basis Library" "Orc"

.SH NAME
md5_init, md5_put, md5_finish \- compute md5 signatures

.SH SYNOPSIS
.B #include <md5lib.h>
.br

.B JH md5_init();
.br
.B void md5_put(char *\fRbfr\fB, int \fRcount\fB, JH \fRhandle\fB);
.br
.B char* md5_finish(JH \fRhandle\fB, char* \fRsigbuffer\fB);

.SH DESCRIPTION
These functions are used to generate md5 signatures.  They are set up
rather like
.BR stdio\fR,
where you open a connection, write things into the connection, then
close it up.
.PP
.B md5_init
is called to set up for generating a md signature.  When you call it,
you'll either get a nonzero
.B JH
handle back or zero if something went wrong (if this is the case,
errno will contain the reason why.)
.PP
.B md5_put
is used to feed blocks of data into the md5 signature generator.  As
you call
.B md5_put\fR,
the data is processed and added into the signature
that's being generated.
.PP
When you have finished writing the data you wish to get a signature
from into the
.B JH
that you've got set up, you call
.B md5_finish
to finish generating the signature and hand it back. 
.B md5_finish
returns a pointer to a
16-byte array that contains the signature.  If you don't
pass it an array to hold this signature, it will return
it in a
.I static
buffer which will be overwritten at the next call to
md5_finish.

.SH BUGS
Neither
.B md5_put
or
.B md5_finish
do any error checking.  If you pass in a bogus
.B JH
they will cheerfully try to process it and most likely
dump core on you.


.SH NOTES
.B md5lib
is written from the spec in
.I RFC 1321\fR.
It contains none of the code from that rfc or from any
other source.
.PP
.B JH
stands for
.B John Hancock\fR,
who was the first signer of the American
declaration of independence.

.SH COPYRIGHT
None.
.B md5lib
is in the public domain.

.SH AUTHOR
David Parsons (
.I orc@pell.chi.il.us
)
