2 * $Id: md5.c,v 1.1 2004/11/14 07:26:26 paulus Exp $
6 #include <pppd/crypto.h>
8 int rc_md5_calc(unsigned char *out, const unsigned char *in, unsigned int inl)
11 int outl = MD5_DIGEST_LENGTH;
13 PPP_MD_CTX *ctx = PPP_MD_CTX_new();
16 if (PPP_DigestInit(ctx, PPP_md5())) {
18 if (PPP_DigestUpdate(ctx, in, inl)) {
20 if (PPP_DigestFinal(ctx, out, &outl)) {