1
/*-------------------------------------------------------------------------
4
* Interface to libpq/crypt.c
6
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
7
* Portions Copyright (c) 1994, Regents of the University of California
9
* $PostgreSQL: pgsql/src/include/libpq/crypt.h,v 1.30 2004-12-31 22:03:32 pgsql Exp $
11
*-------------------------------------------------------------------------
16
#include "libpq/libpq-be.h"
18
#define MD5_PASSWD_LEN 35
20
#define isMD5(passwd) (strncmp((passwd),"md5",3) == 0 && \
21
strlen(passwd) == MD5_PASSWD_LEN)
24
extern int md5_crypt_verify(const Port *port, const char *user,
26
extern bool md5_hash(const void *buff, size_t len, char *hexsum);
27
extern bool CheckMD5Pwd(char *passwd, char *storedpwd, char *seed);
29
extern bool EncryptMD5(const char *passwd, const char *salt,
30
size_t salt_len, char *buf);