1 /*-------------------------------------------------------------------------
4 * Interface to libpq/crypt.c
6 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * $Id: crypt.h,v 1.20 2002/04/04 04:25:53 momjian Exp $
11 *-------------------------------------------------------------------------
16 #include "libpq/libpq-be.h"
18 /* Also defined in interfaces/odbc/md5.h */
19 #define MD5_PASSWD_LEN 35
21 #define isMD5(passwd) (strncmp((passwd),"md5",3) == 0 && \
22 strlen(passwd) == MD5_PASSWD_LEN)
25 extern int md5_crypt_verify(const Port *port, const char *user,
27 extern bool md5_hash(const void *buff, size_t len, char *hexsum);
28 extern bool CheckMD5Pwd(char *passwd, char *storedpwd, char *seed);
29 /* Also defined in interfaces/odbc/md5.h */
30 extern bool EncryptMD5(const char *passwd, const char *salt,
31 size_t salt_len, char *buf);