pub struct ScramClient<'a> { /* fields omitted */ }
The initial state of the SCRAM mechanism. It's the entry point for a SCRAM handshake.
Constructs an initial state for the SCRAM mechanism using the provided credentials.
- authcid - An username used for authentication.
- password - A password used to prove that the user is authentic.
- authzid - An username used for authorization. This can be used to impersonate as
authzid
using the credentials of authcid
. If authzid
is None
the authorized username will be
the same as the authenticated username.
An I/O error is returned if the internal random number generator couldn't be constructed.
Constructs an initial state for the SCRAM mechanism using the provided credentials and a
custom random number generator.
- authcid - An username used for authentication.
- password - A password used to prove that the user is authentic.
- authzid - An username used for authorization. This can be used to impersonate as
authzid
using the credentials of authcid
. If authzid
is None
the authorized username will be
the same as the authenticated username.
- rng: A random number generator used to generate random nonces. Please only use a
cryptographically secure random number generator!
Formats the value using the given formatter. Read more