pub struct Scram { /* private fields */ }Expand description
An exchange in progress.
Holds what the first message committed to, so the second can be checked against it.
Implementations§
Source§impl Scram
impl Scram
Sourcepub fn new(username: &str, password: &str, nonce: &str) -> Self
pub fn new(username: &str, password: &str, nonce: &str) -> Self
Start an exchange.
nonce must be unpredictable and never reused: it is what stops a recorded exchange being
replayed. The core has no entropy source, so the host supplies it.
Sourcepub fn client_first(&self) -> Vec<u8> ⓘ
pub fn client_first(&self) -> Vec<u8> ⓘ
The first message to send, including the GS2 header saying we do not use channel binding.
Sourcepub fn client_final(
&mut self,
server_first: &[u8],
) -> Result<Vec<u8>, ScramError>
pub fn client_final( &mut self, server_first: &[u8], ) -> Result<Vec<u8>, ScramError>
Answer the server’s first message with our proof.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scram
impl RefUnwindSafe for Scram
impl Send for Scram
impl Sync for Scram
impl Unpin for Scram
impl UnsafeUnpin for Scram
impl UnwindSafe for Scram
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more