PostgreSQL Source Code: src/include/libpq/crypt.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef PG_CRYPT_H

14#define PG_CRYPT_H

15

17

18

19

20

21

22

23

24

25

26#define MAX_ENCRYPTED_PASSWORD_LEN (512)

27

28

30

31

32

33

34

35

36

37

38

39

41{

46

50

51extern char *get_role_password(const char *role, const char **logdetail);

52

53extern int md5_crypt_verify(const char *role, const char *shadow_pass,

54 const char *client_pass, const uint8 *md5_salt,

55 int md5_salt_len, const char **logdetail);

56extern int plain_crypt_verify(const char *role, const char *shadow_pass,

57 const char *client_pass,

58 const char **logdetail);

59

60#endif

int md5_crypt_verify(const char *role, const char *shadow_pass, const char *client_pass, const uint8 *md5_salt, int md5_salt_len, const char **logdetail)

int plain_crypt_verify(const char *role, const char *shadow_pass, const char *client_pass, const char **logdetail)

@ PASSWORD_TYPE_PLAINTEXT

@ PASSWORD_TYPE_SCRAM_SHA_256

char * get_role_password(const char *role, const char **logdetail)

PasswordType get_password_type(const char *shadow_pass)

PGDLLIMPORT bool md5_password_warnings

char * encrypt_password(PasswordType target_type, const char *role, const char *password)