PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
f
h
i
n
o
p
r
s
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
scram.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* scram.h
4
* Interface to libpq/scram.c
5
*
6
* Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7
* Portions Copyright (c) 1994, Regents of the University of California
8
*
9
* src/include/libpq/scram.h
10
*
11
*-------------------------------------------------------------------------
12
*/
13
#ifndef PG_SCRAM_H
14
#define PG_SCRAM_H
15
16
#include "
common/cryptohash.h
"
17
#include "
lib/stringinfo.h
"
18
#include "
libpq/libpq-be.h
"
19
#include "
libpq/sasl.h
"
20
21
/* Number of iterations when generating new secrets */
22
extern
PGDLLIMPORT
int
scram_sha_256_iterations
;
23
24
/* SASL implementation callbacks */
25
extern
PGDLLIMPORT
const
pg_be_sasl_mech
pg_be_scram_mech
;
26
27
/* Routines to handle and check SCRAM-SHA-256 secret */
28
extern
char
*
pg_be_scram_build_secret
(
const
char
*
password
);
29
extern
bool
parse_scram_secret
(
const
char
*secret,
30
int
*
iterations
,
31
pg_cryptohash_type
*hash_type,
32
int
*key_length,
char
**salt,
33
uint8
*stored_key,
uint8
*server_key);
34
extern
bool
scram_verify_plain_password
(
const
char
*
username
,
35
const
char
*
password
,
const
char
*secret);
36
37
#endif
/* PG_SCRAM_H */
PGDLLIMPORT
#define PGDLLIMPORT
Definition:
c.h:1277
uint8
uint8_t uint8
Definition:
c.h:486
cryptohash.h
pg_cryptohash_type
pg_cryptohash_type
Definition:
cryptohash.h:20
username
static char * username
Definition:
initdb.c:153
libpq-be.h
sasl.h
parse_scram_secret
bool parse_scram_secret(const char *secret, int *iterations, pg_cryptohash_type *hash_type, int *key_length, char **salt, uint8 *stored_key, uint8 *server_key)
Definition:
auth-scram.c:600
pg_be_scram_mech
PGDLLIMPORT const pg_be_sasl_mech pg_be_scram_mech
Definition:
auth-scram.c:114
scram_sha_256_iterations
PGDLLIMPORT int scram_sha_256_iterations
Definition:
auth-scram.c:196
pg_be_scram_build_secret
char * pg_be_scram_build_secret(const char *password)
Definition:
auth-scram.c:483
scram_verify_plain_password
bool scram_verify_plain_password(const char *username, const char *password, const char *secret)
Definition:
auth-scram.c:523
password
static char * password
Definition:
streamutil.c:52
stringinfo.h
pg_be_sasl_mech
Definition:
sasl.h:46
iterations
int iterations
Definition:
thread-thread.c:39
src
include
libpq
scram.h
Generated on Thu Jan 23 2025 06:13:25 for PostgreSQL Source Code by
1.9.4