pub struct SrpClient<'a, D: Digest> { /* private fields */ }Expand description
SRP client state before handshake with the server.
Implementations§
Source§impl<'a, D: Digest> SrpClient<'a, D>
impl<'a, D: Digest> SrpClient<'a, D>
pub fn compute_a_pub(&self, a: &BigUint) -> BigUint
pub fn compute_identity_hash(username: &[u8], password: &[u8]) -> Output<D>
pub fn compute_x(identity_hash: &[u8], salt: &[u8]) -> BigUint
pub fn compute_premaster_secret( &self, b_pub: &BigUint, k: &BigUint, x: &BigUint, a: &BigUint, u: &BigUint, ) -> BigUint
pub fn compute_v(&self, x: &BigUint) -> BigUint
Sourcepub fn compute_verifier(
&self,
username: &[u8],
password: &[u8],
salt: &[u8],
) -> Vec<u8> ⓘ
pub fn compute_verifier( &self, username: &[u8], password: &[u8], salt: &[u8], ) -> Vec<u8> ⓘ
Get password verifier (v in RFC5054) for user registration on the server.
Sourcepub fn compute_public_ephemeral(&self, a: &[u8]) -> Vec<u8> ⓘ
pub fn compute_public_ephemeral(&self, a: &[u8]) -> Vec<u8> ⓘ
Get public ephemeral value for handshaking with the server. g^a % N
Sourcepub fn process_reply(
&self,
a: &[u8],
username: &[u8],
password: &[u8],
salt: &[u8],
b_pub: &[u8],
) -> Result<SrpClientVerifier<D>, SrpAuthError>
pub fn process_reply( &self, a: &[u8], username: &[u8], password: &[u8], salt: &[u8], b_pub: &[u8], ) -> Result<SrpClientVerifier<D>, SrpAuthError>
Process server reply to the handshake. a is a random value, username, password is supplied by the user salt and b_pub come from the server
Auto Trait Implementations§
impl<'a, D> Freeze for SrpClient<'a, D>
impl<'a, D> RefUnwindSafe for SrpClient<'a, D>where
D: RefUnwindSafe,
impl<'a, D> Send for SrpClient<'a, D>where
D: Send,
impl<'a, D> Sync for SrpClient<'a, D>where
D: Sync,
impl<'a, D> Unpin for SrpClient<'a, D>where
D: Unpin,
impl<'a, D> UnwindSafe for SrpClient<'a, D>where
D: UnwindSafe,
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