summaryrefslogtreecommitdiff
path: root/src/include/libpq/crypt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/libpq/crypt.h')
-rw-r--r--src/include/libpq/crypt.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/libpq/crypt.h b/src/include/libpq/crypt.h
index 030921c254..86b9f2497c 100644
--- a/src/include/libpq/crypt.h
+++ b/src/include/libpq/crypt.h
@@ -24,4 +24,13 @@ extern char *crypt_getpwdreloadfilename(void);
extern int md5_crypt_verify(const Port *port, const char *user, const char *pgpass);
+extern bool md5_hash(const void *buff, size_t len, char *hexsum);
+extern bool CheckMD5Pwd(char *passwd, char *storedpwd, char *seed);
+extern bool EncryptMD5(const char *passwd, const char *salt, char *buf);
+
+#define MD5_PASSWD_LEN 35
+
+#define isMD5(passwd) (strncmp((passwd),"md5",3) == 0 && \
+ strlen(passwd) == MD5_PASSWD_LEN)
+
#endif