Skip to content

Commit

Permalink
Fix non working Digest imported interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsanchezq committed Sep 16, 2020
1 parent b6dc82d commit 5403b7a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion chain-crypto/src/algorithms/sumed25519/common.rs
Expand Up @@ -58,7 +58,8 @@ impl Depth {
}

pub fn split_seed(r: &Seed) -> (Seed, Seed) {
use ed25519_dalek::Digest;
// use ed25519_dalek::Digest;
use sha2::digest::Digest;
let mut hleft = sha2::Sha256::default();
let mut hright = sha2::Sha256::default();

Expand Down
3 changes: 2 additions & 1 deletion chain-crypto/src/algorithms/sumed25519/sum.rs
@@ -1,6 +1,6 @@
use super::common::{self, Depth, Seed};
use ed25519_dalek as ed25519;
use ed25519_dalek::{Digest, Signer as _, Verifier as _};
use ed25519_dalek::{Signer as _, Verifier as _};
use std::convert::TryFrom as _;
//use std::hash::Hash;

Expand Down Expand Up @@ -487,6 +487,7 @@ impl Signature {
}

pub fn hash(pk1: &PublicKey, pk2: &PublicKey) -> PublicKey {
use sha2::digest::Digest;
let mut out = [0u8; 32];
let mut h = sha2::Sha256::default();
h.input(&pk1.0);
Expand Down
3 changes: 2 additions & 1 deletion chain-crypto/src/algorithms/sumed25519/sumrec.rs
Expand Up @@ -4,7 +4,8 @@
// is sum. this module should never be used for anything but testing.
use super::common::{self, Depth, Seed};
use ed25519_dalek as ed25519;
use ed25519_dalek::{Digest, Signer as _, Verifier as _};
use ed25519_dalek::{Signer as _, Verifier as _};
use sha2::Digest;

pub enum SecretKey {
Leaf(ed25519::Keypair),
Expand Down

0 comments on commit 5403b7a

Please sign in to comment.