diff options
author | Brian Warner <warner@lothar.com> | 2018-12-06 11:48:10 -0800 |
---|---|---|
committer | Brian Warner <warner@lothar.com> | 2018-12-06 15:00:20 -0800 |
commit | 59203944db2c9c1f1e0ee19c721633c637ec40b2 (patch) | |
tree | 921dcbceafb3da66fe41b0165f0346803d1ed457 | |
parent | dcf4842af1070da895f3b458e6fe620ee584d0e7 (diff) | |
download | PAKEs-59203944db2c9c1f1e0ee19c721633c637ec40b2.tar.xz |
update spake2 to edition-2018
-rw-r--r-- | spake2/Cargo.toml | 1 | ||||
-rw-r--r-- | spake2/benches/spake2.rs | 6 | ||||
-rw-r--r-- | spake2/src/lib.rs | 10 | ||||
-rw-r--r-- | spake2/tests/mod.rs | 2 |
4 files changed, 3 insertions, 16 deletions
diff --git a/spake2/Cargo.toml b/spake2/Cargo.toml index 1c67654..1ae436a 100644 --- a/spake2/Cargo.toml +++ b/spake2/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "spake2" version = "0.1.2-alpha.0" +edition = "2018" authors = ["Brian Warner <warner@lothar.com>"] description = "The SPAKE2 password-authenticated key-exchange algorithm." documentation = "https://docs.rs/spake2" diff --git a/spake2/benches/spake2.rs b/spake2/benches/spake2.rs index 8323342..c213947 100644 --- a/spake2/benches/spake2.rs +++ b/spake2/benches/spake2.rs @@ -1,9 +1,5 @@ -#[macro_use] -extern crate bencher; - -extern crate spake2; - use bencher::Bencher; +use bencher::{benchmark_group, benchmark_main}; use spake2::{Ed25519Group, Identity, Password, SPAKE2}; fn spake2_start(bench: &mut Bencher) { diff --git a/spake2/src/lib.rs b/spake2/src/lib.rs index 4ef7ad5..ea488ba 100644 --- a/spake2/src/lib.rs +++ b/spake2/src/lib.rs @@ -288,18 +288,10 @@ #![deny(warnings)] #![forbid(unsafe_code)] -extern crate curve25519_dalek; -extern crate hex; -extern crate hkdf; -extern crate num_bigint; -extern crate rand; -extern crate sha2; - use curve25519_dalek::constants::ED25519_BASEPOINT_POINT; use curve25519_dalek::edwards::CompressedEdwardsY; use curve25519_dalek::edwards::EdwardsPoint as c2_Element; use curve25519_dalek::scalar::Scalar as c2_Scalar; - use hkdf::Hkdf; use rand::{rngs::OsRng, CryptoRng, Rng}; use sha2::{Digest, Sha256}; @@ -828,7 +820,7 @@ fn maybe_utf8(s: &[u8]) -> String { } impl<G: Group> fmt::Debug for SPAKE2<G> { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { fmt.debug_struct("SPAKE2") .field("group", &G::name()) .field("side", &self.side) diff --git a/spake2/tests/mod.rs b/spake2/tests/mod.rs index e85a9b6..07ba946 100644 --- a/spake2/tests/mod.rs +++ b/spake2/tests/mod.rs @@ -1,5 +1,3 @@ -extern crate spake2; - use spake2::{Ed25519Group, ErrorType, Identity, Password, SPAKEErr, SPAKE2}; #[test] |