async_postgres/pg_saslprep

Search:
Group by:

RFC 4013 SASLprep (stringprep profile for user names and passwords). Applied to passwords before SCRAM-SHA-256 PBKDF2 so that PostgreSQL, which stores pg_saslprep-normalized verifiers, accepts passwords whose Unicode form differs from the raw input (e.g. U+00A0 -> U+0020, U+FB01 "fi" ligature -> "fi", NFKC-decomposed forms).

Procs

proc saslprep(input: string): string {....raises: [], tags: [], forbids: [].}
Apply RFC 4013 SASLprep. On invalid UTF-8, prohibited or unassigned code points, bidi violations, or an empty post-mapping result, fall back to the raw input to match libpq and PG server behavior. Unlike libpq, which reads a C string, an embedded NUL does not end the input.