diff options
author | Tony Arcieri <bascule@gmail.com> | 2021-12-20 18:46:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-20 18:46:23 -0700 |
commit | 689dc0ab6af950b027b4bab96f73c427d2c42d6e (patch) | |
tree | 83f9792448b9017322724f6145a11ce34a18d608 /srp/src | |
parent | e38144177199721c3bf3f5e2cde403c2ce29c67e (diff) | |
download | PAKEs-689dc0ab6af950b027b4bab96f73c427d2c42d6e.tar.xz |
2021 edition bump + doc improvements; MSRV 1.56 (#80)
- Bumps both `spake2` and `srp` to Rust 2021 edition
- Uses the new `doc = include_str!(...)` attribute to include README.md
files in the rustdoc
- Improves the README.md files, adding an initial one for `srp`
- clippy fixes for Rust 1.56
Diffstat (limited to 'srp/src')
-rw-r--r-- | srp/src/lib.rs | 18 | ||||
-rw-r--r-- | srp/src/types.rs | 2 |
2 files changed, 5 insertions, 15 deletions
diff --git a/srp/src/lib.rs b/srp/src/lib.rs index ada3b8c..375dfb3 100644 --- a/srp/src/lib.rs +++ b/srp/src/lib.rs @@ -1,14 +1,7 @@ -//! [Secure Remote Password][1] (SRP) protocol implementation. -//! -//! This implementation is generic over hash functions using -//! [`Digest`](https://docs.rs/digest) trait, so you will need to choose a hash -//! function, e.g. `Sha256` from [`sha2`](https://crates.io/crates/sha2) crate. -//! Additionally this crate allows to use a specialized password hashing -//! algorithm for private key computation instead of method described in the -//! SRP literature. -//! -//! Compatibility with other implementations was not yet tested. -//! +#![allow(clippy::many_single_char_names)] +#![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")] +#![doc = include_str!("../README.md")] + //! # Usage //! Add `srp` dependency to your `Cargo.toml`: //! @@ -63,9 +56,6 @@ //! [1]: https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol //! [2]: https://tools.ietf.org/html/rfc5054 -#![allow(clippy::many_single_char_names)] -#![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")] - pub mod client; pub mod groups; pub mod server; diff --git a/srp/src/types.rs b/srp/src/types.rs index 41742d5..a23954e 100644 --- a/srp/src/types.rs +++ b/srp/src/types.rs @@ -46,7 +46,7 @@ impl SrpGroup { let mut d = D::new(); d.update(&n); d.update(&buf); - BigUint::from_bytes_be(&d.finalize().as_slice()) + BigUint::from_bytes_be(d.finalize().as_slice()) } /// Compute `Hash(N) xor Hash(g)` with given hash function and return SRP parameters |