1 /*-------------------------------------------------------------------------
4 * Interface to libpq/md5.c
6 * These definitions are needed by both frontend and backend code to work
7 * with MD5-encrypted passwords.
9 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
10 * Portions Copyright (c) 1994, Regents of the University of California
14 *-------------------------------------------------------------------------
19 #define MD5_PASSWD_LEN 35
21 #define isMD5(passwd) (strncmp(passwd, "md5", 3) == 0 && \
22 strlen(passwd) == MD5_PASSWD_LEN)
25 extern bool pg_md5_hash(const void *buff
, size_t len
, char *hexsum
);
26 extern bool pg_md5_encrypt(const char *passwd
, const char *salt
,
27 size_t salt_len
, char *buf
);