2006-06-20 15:56:52 -04:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
*
|
|
|
|
|
* md5.h
|
|
|
|
|
* Interface to libpq/md5.c
|
|
|
|
|
*
|
|
|
|
|
* These definitions are needed by both frontend and backend code to work
|
|
|
|
|
* with MD5-encrypted passwords.
|
|
|
|
|
*
|
2018-01-02 23:30:12 -05:00
|
|
|
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
|
2006-06-20 15:56:52 -04:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
|
*
|
2016-09-02 06:49:59 -04:00
|
|
|
* src/include/common/md5.h
|
2006-06-20 15:56:52 -04:00
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
#ifndef PG_MD5_H
|
|
|
|
|
#define PG_MD5_H
|
|
|
|
|
|
2019-04-23 02:43:32 -04:00
|
|
|
#define MD5_PASSWD_CHARSET "0123456789abcdef"
|
2006-06-20 15:56:52 -04:00
|
|
|
#define MD5_PASSWD_LEN 35
|
|
|
|
|
|
|
|
|
|
extern bool pg_md5_hash(const void *buff, size_t len, char *hexsum);
|
2010-01-27 07:12:00 -05:00
|
|
|
extern bool pg_md5_binary(const void *buff, size_t len, void *outbuf);
|
2006-06-20 15:56:52 -04:00
|
|
|
extern bool pg_md5_encrypt(const char *passwd, const char *salt,
|
|
|
|
|
size_t salt_len, char *buf);
|
|
|
|
|
|
|
|
|
|
#endif
|