Fix xslt_process() to ensure that it inserts a NULL terminator after the
[PostgreSQL.git] / src / include / libpq / md5.h
blob255c53198095194f0358b07c78bf3a7c38ab6813
1 /*-------------------------------------------------------------------------
3 * md5.h
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
12 * $PostgreSQL$
14 *-------------------------------------------------------------------------
16 #ifndef PG_MD5_H
17 #define PG_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 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);
29 #endif