MD5(3BM)

NAME
MD5Init, MD5Update, MD5Final

SYNOPSIS
#include <libcrypt.h>

MD5Init(MD5_CTX *mdContext)

MD5Update(MD5_CTX *mdContext, unsigned char *data, int numbytes)

MD5Final(unsigned char digest[16], MD5_CTX *mdContext)

DESCRIPTION

For all of these functions $BigInt$ arguments are assumed to be initialized $BigInts$. $bigInit(0)$ should be used for initialization of empty $BigInts$. If more space is needed than is provided the functions themselves take care of the space allocation. $MD5Init$ takes a $MD5_CTX$ structure as input initialized simply as:
mdContext = (MD5_CTX *)malloc(sizeof(MD5_CTX)); This function must be called to start the digest process. $MD5Update$ is the digest work routine. It is fed 16 byte chunks of data and updates the digest. $MDFinal$ is called to terminate the digest. $bigMessageDigest$ uses these three functions to create a digest for a buffer of characters. The digest is returned in a $BigInt$. $MD5Print$ prints the digest to stdout. MD2 and MD4 are also supported and have exactly the same interface except that MD4Final leaves the digest in the context structure: $MD4Final(MD4_CTX *context)$.

SEE ALSO
bigInit(3BM), bigTest(3BM), bigBits(3BM), bigToBuf(3BM), bufToBig(3BM), fBigPrint(3BM), atobig(3BM)