[−][src]Struct srp::server::SrpServer
SRP server state
Implementations
impl<D: Digest> SrpServer<D>
[src]
pub fn new(
user: &UserRecord<'_>,
a_pub: &[u8],
b: &[u8],
params: &SrpGroup
) -> Result<Self, SrpAuthError>
[src]
user: &UserRecord<'_>,
a_pub: &[u8],
b: &[u8],
params: &SrpGroup
) -> Result<Self, SrpAuthError>
Create new server state.
pub fn get_b(&self) -> Vec<u8>
[src]
Get private b
value. (see new_with_b
documentation)
pub fn get_b_pub(&self) -> Vec<u8>
[src]
Get public b_pub
value for sending to the user.
pub fn get_key(&self) -> Output<D>
[src]
Get shared secret between user and the server. (do not forget to verify that keys are the same!)
pub fn verify(&self, user_proof: &[u8]) -> Result<Output<D>, SrpAuthError>
[src]
Process user proof of having the same shared secret and compute server proof for sending to the user.
Auto Trait Implementations
impl<D> RefUnwindSafe for SrpServer<D> where
D: RefUnwindSafe,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
D: RefUnwindSafe,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<D> Send for SrpServer<D> where
D: Send,
<D as Digest>::OutputSize: ArrayLength<u8>,
D: Send,
<D as Digest>::OutputSize: ArrayLength<u8>,
impl<D> Sync for SrpServer<D> where
D: Sync,
<D as Digest>::OutputSize: ArrayLength<u8>,
D: Sync,
<D as Digest>::OutputSize: ArrayLength<u8>,
impl<D> Unpin for SrpServer<D> where
D: Unpin,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: Unpin,
D: Unpin,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: Unpin,
impl<D> UnwindSafe for SrpServer<D> where
D: UnwindSafe,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
D: UnwindSafe,
<<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,