[][src]Struct scram::client::ScramClient

pub struct ScramClient<'a> { /* fields omitted */ }

The initial state of the SCRAM mechanism. It's the entry point for a SCRAM handshake.

Methods

impl<'a> ScramClient<'a>
[src]

Constructs an initial state for the SCRAM mechanism using the provided credentials.

Arguments

  • 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.

Return value

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.

Arguments

  • 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!

Returns the next state and the first client message.

Call the ServerFirst::handle_server_first method to continue the SCRAM handshake.

Trait Implementations

impl<'a> Debug for ScramClient<'a>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for ScramClient<'a>

impl<'a> Sync for ScramClient<'a>

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more