Struct srp::server::SrpServer
[−]
[src]
pub struct SrpServer<D: Digest> { /* fields omitted */ }
SRP server state
Methods
impl<D: Digest> SrpServer<D>
[src]
fn new(
user: &UserRecord,
a_pub: &[u8],
b: &[u8],
params: &SrpGroup
) -> Result<Self, SrpAuthError>
user: &UserRecord,
a_pub: &[u8],
b: &[u8],
params: &SrpGroup
) -> Result<Self, SrpAuthError>
Create new server state.
fn get_b(&self) -> Vec<u8>
Get private b
value. (see new_with_b
documentation)
fn get_b_pub(&self) -> Vec<u8>
Get public b_pub
value for sending to the user.
fn get_key(&self) -> GenericArray<u8, D::OutputSize>
Get shared secret between user and the server. (do not forget to verify that keys are the same!)
fn verify(
&self,
user_proof: &[u8]
) -> Result<GenericArray<u8, D::OutputSize>, SrpAuthError>
&self,
user_proof: &[u8]
) -> Result<GenericArray<u8, D::OutputSize>, SrpAuthError>
Process user proof of having the same shared secret and compute server proof for sending to the user.