aboutsummaryrefslogtreecommitdiff
path: root/spake2
diff options
context:
space:
mode:
authorBrian Warner <warner@lothar.com>2018-12-20 16:01:37 -0500
committerBrian Warner <warner@lothar.com>2018-12-20 16:01:37 -0500
commitaa9674bbc150bac4352b80382724daf052072c8c (patch)
tree30f75541594804731da4ff06b1fdefaed334551b /spake2
parentbd19c404c6a6f316871518ace644d8ef871afc61 (diff)
parent3711fa0839f0013a2ac545c8356602d2c51e1ea8 (diff)
downloadPAKEs-aa9674bbc150bac4352b80382724daf052072c8c.tar.xz
Merge branch 'edition-2018'
Diffstat (limited to 'spake2')
-rw-r--r--spake2/Cargo.toml1
-rw-r--r--spake2/benches/spake2.rs6
-rw-r--r--spake2/src/lib.rs10
-rw-r--r--spake2/tests/mod.rs2
4 files changed, 3 insertions, 16 deletions
diff --git a/spake2/Cargo.toml b/spake2/Cargo.toml
index 5ea28d6..8c7a661 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]