summaryrefslogtreecommitdiff
path: root/src/include/libpq/crypt.h
blob: dce83a2a3b1c55671f12bfa2438c34a06f50690d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*-------------------------------------------------------------------------
 *
 * crypt.h
 *	  Interface to libpq/crypt.c
 *
 * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * src/include/libpq/crypt.h
 *
 *-------------------------------------------------------------------------
 */
#ifndef PG_CRYPT_H
#define PG_CRYPT_H

#include "datatype/timestamp.h"

extern int	get_role_password(const char *role, char **shadow_pass, char **logdetail);

extern int md5_crypt_verify(const char *role, const char *shadow_pass,
				 const char *client_pass, const char *md5_salt,
				 int md5_salt_len, char **logdetail);
extern int plain_crypt_verify(const char *role, const char *shadow_pass,
				   const char *client_pass, char **logdetail);

#endif