aboutsummaryrefslogtreecommitdiff
path: root/srp/src
diff options
context:
space:
mode:
authorest31 <est31@users.noreply.github.com>2019-11-06 13:31:52 +0100
committerArtyom Pavlov <newpavlov@gmail.com>2019-11-06 12:31:52 +0000
commitbdacf51e2cfaea8bec44417b7b3d7ace7b8ab79c (patch)
treeb4ee8fb63f99d698c2f951acd5877bb673a6eec0 /srp/src
parenteb14c16ea1c6f722940bebe6dfce26138324ae37 (diff)
downloadPAKEs-bdacf51e2cfaea8bec44417b7b3d7ace7b8ab79c.tar.xz
Switch from num to num-traits and num-bigint (#31)
Diffstat (limited to 'srp/src')
-rw-r--r--srp/src/client.rs3
-rw-r--r--srp/src/groups.rs2
-rw-r--r--srp/src/server.rs3
-rw-r--r--srp/src/tools.rs2
-rw-r--r--srp/src/types.rs2
5 files changed, 7 insertions, 5 deletions
diff --git a/srp/src/client.rs b/srp/src/client.rs
index 78be566..db4c576 100644
--- a/srp/src/client.rs
+++ b/srp/src/client.rs
@@ -60,7 +60,8 @@ use std::marker::PhantomData;
use digest::Digest;
use generic_array::GenericArray;
-use num::{BigUint, Zero};
+use num_bigint::BigUint;
+use num_traits::Zero;
use crate::tools::powm;
use crate::types::{SrpAuthError, SrpGroup};
diff --git a/srp/src/groups.rs b/srp/src/groups.rs
index d5c5fb9..86bc681 100644
--- a/srp/src/groups.rs
+++ b/srp/src/groups.rs
@@ -5,7 +5,7 @@
//! they are provided only for compatibility with the legacy software.
use crate::types::SrpGroup;
use lazy_static::lazy_static;
-use num::BigUint;
+use num_bigint::BigUint;
lazy_static! {
pub static ref G_1024: SrpGroup = SrpGroup {
diff --git a/srp/src/server.rs b/srp/src/server.rs
index a4764d3..6e41404 100644
--- a/srp/src/server.rs
+++ b/srp/src/server.rs
@@ -38,7 +38,8 @@ use std::marker::PhantomData;
use digest::Digest;
use generic_array::GenericArray;
-use num::{BigUint, Zero};
+use num_bigint::BigUint;
+use num_traits::Zero;
use crate::tools::powm;
use crate::types::{SrpAuthError, SrpGroup};
diff --git a/srp/src/tools.rs b/srp/src/tools.rs
index 4fc5db9..f761dca 100644
--- a/srp/src/tools.rs
+++ b/srp/src/tools.rs
@@ -1,4 +1,4 @@
-use num::BigUint;
+use num_bigint::BigUint;
pub fn powm(base: &BigUint, exp: &BigUint, modulus: &BigUint) -> BigUint {
let zero = BigUint::new(vec![0]);
diff --git a/srp/src/types.rs b/srp/src/types.rs
index 692421f..5dca858 100644
--- a/srp/src/types.rs
+++ b/srp/src/types.rs
@@ -1,7 +1,7 @@
//! Additional SRP types.
use crate::tools::powm;
use digest::Digest;
-use num::BigUint;
+use num_bigint::BigUint;
use std::{error, fmt};
/// SRP authentication error.