2 ** Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
3 ** distribution information.
7 #include "courier_auth_config.h"
16 static const char rcsid
[]="$Id: checkpasswordmd5.c,v 1.7 2004/10/21 00:10:49 mrsam Exp $";
18 int authcheckpasswordmd5(const char *password
, const char *encrypted_password
)
20 if (strncmp(encrypted_password
, "$1$", 3) == 0)
22 return (strcmp(encrypted_password
,
23 md5_crypt(password
, encrypted_password
)));
26 if (strncasecmp(encrypted_password
, "{MD5}", 5) == 0)
28 return (strcmp(encrypted_password
+5, md5_hash_courier(password
)));