As always, there are some functions that just don't fit anywhere.
Prepares the encrypted form of a PostgreSQL password.
char * PQencryptPassword(const char *passwd, const char *user);
This function is intended to be used by client
applications that wish to send commands like ALTER USER joe PASSWORD 'pwd'. It is good
practice not to send the original cleartext password in
such a command, because it might be exposed in command
logs, activity displays, and so on. Instead, use this
function to convert the password to encrypted form before
it is sent. The arguments are the cleartext password, and
the SQL name of the user it is for. The return value is a
string allocated by
or NULL if out of memory. The
caller may assume the string doesn't contain any special
characters that would require escaping. Use
PQfreemem to free the result when done
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.