Skip to content

Commit

Permalink
Merge pull request #1241 from zancas/update_ripemd
Browse files Browse the repository at this point in the history
remove ripemd160 in favor of SHA2 and cargo update
  • Loading branch information
Oscar-Pepper authored Sep 9, 2024
2 parents ab0d561 + 3305a2b commit c93cdaf
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 17 deletions.
12 changes: 0 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ prost = "0.12.0"
rand = "0.8.5"
reqwest = "0.12"
ring = "0.17.0"
ripemd160 = "0.9.1"
rust-embed = "6.3.0"
rustls-pemfile = "1.0.0"
rustyline = "11.0.0"
Expand Down
1 change: 0 additions & 1 deletion zingolib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ prost = { workspace = true }
rand = { workspace = true }
reqwest = { workspace = true, features = ["json"] }
ring = { workspace = true }
ripemd160 = { workspace = true }
rust-embed = { workspace = true, features = ["debug-embed"] }
sapling-crypto.workspace = true
secp256k1 = { workspace = true }
Expand Down
5 changes: 2 additions & 3 deletions zingolib/src/wallet/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! from a source outside of the code-base e.g. a wallet-file.
use crate::config::{ChainType, ZingoConfig};
use base58::ToBase58;
use ripemd160::Digest;
use sapling_crypto::{
zip32::{DiversifiableFullViewingKey, ExtendedSpendingKey},
PaymentAddress,
Expand All @@ -19,8 +18,8 @@ pub mod unified;

/// Sha256(Sha256(value))
pub fn double_sha256(payload: &[u8]) -> Vec<u8> {
let h1 = Sha256::digest(payload);
let h2 = Sha256::digest(&h1);
let h1 = <Sha256 as sha2::Digest>::digest(payload);
let h2 = <Sha256 as sha2::Digest>::digest(h1.as_slice());
h2.to_vec()
}

Expand Down

0 comments on commit c93cdaf

Please sign in to comment.