summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian2001-08-15 18:42:55 +0000
committerBruce Momjian2001-08-15 18:42:55 +0000
commit957613be18e6b771ed932222361ff7faa5234c76 (patch)
tree6fa7763f3c09debf4cdb8d84ab2d6b8ab0d319da /src/include
parent38bb1abcda9119957e836f731a1cfea6d2079499 (diff)
Add new files.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/libpq/md5.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/include/libpq/md5.h b/src/include/libpq/md5.h
new file mode 100644
index 0000000000..c30ad0ce61
--- /dev/null
+++ b/src/include/libpq/md5.h
@@ -0,0 +1,21 @@
+/*-------------------------------------------------------------------------
+ *
+ * md5.h
+ * Interface to hba.c
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef PG_MD5_H
+#define PG_MD5_H
+
+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