[][src]Struct srp::server::SrpServer

pub struct SrpServer<D: Digest> { /* fields omitted */ }

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]

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

impl<D> Send for SrpServer<D> where
    D: Send,
    <D as Digest>::OutputSize: ArrayLength<u8>, 

impl<D> Sync for SrpServer<D> where
    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

impl<D> UnwindSafe for SrpServer<D> where
    D: UnwindSafe,
    <<D as Digest>::OutputSize as ArrayLength<u8>>::ArrayType: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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]

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.