summaryrefslogtreecommitdiff
path: root/src/include/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/common')
-rw-r--r--src/include/common/cryptohash.h3
-rw-r--r--src/include/common/md5.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/include/common/cryptohash.h b/src/include/common/cryptohash.h
index 0e4a6631a38..6ead1cb8e5b 100644
--- a/src/include/common/cryptohash.h
+++ b/src/include/common/cryptohash.h
@@ -18,7 +18,8 @@
/* Context Structures for each hash function */
typedef enum
{
- PG_SHA224 = 0,
+ PG_MD5 = 0,
+ PG_SHA224,
PG_SHA256,
PG_SHA384,
PG_SHA512
diff --git a/src/include/common/md5.h b/src/include/common/md5.h
index 8695f10dffc..53036d2d17e 100644
--- a/src/include/common/md5.h
+++ b/src/include/common/md5.h
@@ -1,7 +1,7 @@
/*-------------------------------------------------------------------------
*
* md5.h
- * Interface to libpq/md5.c
+ * Constants and common utilities related to MD5.
*
* These definitions are needed by both frontend and backend code to work
* with MD5-encrypted passwords.
@@ -19,9 +19,10 @@
#define MD5_PASSWD_CHARSET "0123456789abcdef"
#define MD5_PASSWD_LEN 35
+/* Utilities common to all the MD5 implementations, as of md5_common.c */
extern bool pg_md5_hash(const void *buff, size_t len, char *hexsum);
extern bool pg_md5_binary(const void *buff, size_t len, void *outbuf);
extern bool pg_md5_encrypt(const char *passwd, const char *salt,
size_t salt_len, char *buf);
-#endif
+#endif /* PG_MD5_H */