[package]
name = "srp"
version = "0.3.0"
+edition = "2018"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
description = "Secure Remote Password (SRP) protocol implementation"
//! groups. Additionally it is not recommended to use `G_1024` and `G_1536`,
//! they are provided only for compatibility with the legacy software.
use crate::types::SrpGroup;
+use lazy_static::lazy_static;
use num::BigUint;
lazy_static! {
//! [1]: https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol
//! [2]: https://tools.ietf.org/html/rfc5054
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")]
-extern crate digest;
-extern crate generic_array;
-extern crate num;
-#[macro_use]
-extern crate lazy_static;
-
-#[cfg(test)]
-extern crate sha1;
pub mod client;
pub mod groups;
impl<D: Digest> SrpServer<D> {
/// Create new server state.
pub fn new(
- user: &UserRecord,
+ user: &UserRecord<'_>,
a_pub: &[u8],
b: &[u8],
params: &SrpGroup,
}
impl fmt::Display for SrpAuthError {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "SRP authentification error")
}
}
-extern crate num;
-extern crate rand;
-extern crate sha2;
-extern crate srp;
-
+use rand;
use rand::RngCore;
use sha2::Sha256;