Skip to content

Commit 20ba84c

Browse files
committed
Update hashes to 0.16.0
The `0.15.0` was a massive release for `hashes` in terms of API clean up and also adding new HKDF support. ElligatorSwift in combination with HKDF are the primitives required for encrypted message passing on bitcoin, so exporting these in tandum would save an additional `hashes` dependency. I skip to `0.16.0` because `hashes` allows for `hex-conservative` as an optional dependency, and no listed changes elsewhere.
1 parent fc912cb commit 20ba84c

File tree

6 files changed

+35
-17
lines changed

6 files changed

+35
-17
lines changed

Cargo-minimal.lock

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,26 @@ dependencies = [
2323
"serde",
2424
]
2525

26+
[[package]]
27+
name = "bitcoin-internals"
28+
version = "0.4.0"
29+
source = "registry+https://github.com/rust-lang/crates.io-index"
30+
checksum = "2b854212e29b96c8f0fe04cab11d57586c8f3257de0d146c76cb3b42b3eb9118"
31+
2632
[[package]]
2733
name = "bitcoin-io"
28-
version = "0.1.2"
34+
version = "0.2.0"
2935
source = "registry+https://github.com/rust-lang/crates.io-index"
30-
checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56"
36+
checksum = "26792cd2bf245069a1c5acb06aa7ad7abe1de69b507c90b490bca81e0665d0ee"
37+
dependencies = [
38+
"bitcoin-internals",
39+
]
3140

3241
[[package]]
3342
name = "bitcoin_hashes"
34-
version = "0.14.0"
43+
version = "0.16.0"
3544
source = "registry+https://github.com/rust-lang/crates.io-index"
36-
checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16"
45+
checksum = "7e5d09f16329cd545d7e6008b2c6b2af3a90bc678cf41ac3d2f6755943301b16"
3746
dependencies = [
3847
"bitcoin-io",
3948
"hex-conservative",
@@ -107,9 +116,9 @@ checksum = "ee6c0438de3ca4d8cac2eec62b228e2f8865cfe9ebefea720406774223fa2d2e"
107116

108117
[[package]]
109118
name = "hex-conservative"
110-
version = "0.2.1"
119+
version = "0.3.0"
111120
source = "registry+https://github.com/rust-lang/crates.io-index"
112-
checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd"
121+
checksum = "4afe881d0527571892c4034822e59bb10c6c991cce6abe8199b6f5cf10766f55"
113122
dependencies = [
114123
"arrayvec",
115124
]

Cargo-recent.lock

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,26 @@ dependencies = [
2323
"serde",
2424
]
2525

26+
[[package]]
27+
name = "bitcoin-internals"
28+
version = "0.4.0"
29+
source = "registry+https://github.com/rust-lang/crates.io-index"
30+
checksum = "2b854212e29b96c8f0fe04cab11d57586c8f3257de0d146c76cb3b42b3eb9118"
31+
2632
[[package]]
2733
name = "bitcoin-io"
28-
version = "0.1.2"
34+
version = "0.2.0"
2935
source = "registry+https://github.com/rust-lang/crates.io-index"
30-
checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56"
36+
checksum = "26792cd2bf245069a1c5acb06aa7ad7abe1de69b507c90b490bca81e0665d0ee"
37+
dependencies = [
38+
"bitcoin-internals",
39+
]
3140

3241
[[package]]
3342
name = "bitcoin_hashes"
34-
version = "0.14.0"
43+
version = "0.16.0"
3544
source = "registry+https://github.com/rust-lang/crates.io-index"
36-
checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16"
45+
checksum = "7e5d09f16329cd545d7e6008b2c6b2af3a90bc678cf41ac3d2f6755943301b16"
3746
dependencies = [
3847
"bitcoin-io",
3948
"hex-conservative",
@@ -101,9 +110,9 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
101110

102111
[[package]]
103112
name = "hex-conservative"
104-
version = "0.2.1"
113+
version = "0.3.0"
105114
source = "registry+https://github.com/rust-lang/crates.io-index"
106-
checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd"
115+
checksum = "4afe881d0527571892c4034822e59bb10c6c991cce6abe8199b6f5cf10766f55"
107116
dependencies = [
108117
"arrayvec",
109118
]

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ arbitrary = ["dep:arbitrary"]
3838
secp256k1-sys = { version = "0.11.0", default-features = false, path = "./secp256k1-sys" }
3939

4040
arbitrary = { version = "1.4", optional = true }
41-
hashes = { package = "bitcoin_hashes", version = "0.14", default-features = false, optional = true }
41+
hashes = { package = "bitcoin_hashes", version = "0.16", default-features = false, optional = true }
4242
rand = { version = "0.9", default-features = false, optional = true }
4343
serde = { version = "1.0.103", default-features = false, optional = true }
4444

examples/sign_verify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
extern crate hashes;
22
extern crate secp256k1;
33

4-
use hashes::{sha256, Hash};
4+
use hashes::sha256;
55
use secp256k1::{ecdsa, Error, Message, PublicKey, Secp256k1, SecretKey, Signing, Verification};
66

77
fn verify<C: Verification>(

examples/sign_verify_recovery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
extern crate hashes;
22
extern crate secp256k1;
33

4-
use hashes::{sha256, Hash};
4+
use hashes::sha256;
55
use secp256k1::{ecdsa, Error, Message, PublicKey, Secp256k1, SecretKey, Signing, Verification};
66

77
fn recover<C: Verification>(

src/secret.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ macro_rules! impl_display_secret {
1414
#[cfg(feature = "hashes")]
1515
impl ::core::fmt::Debug for $thing {
1616
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
17-
use hashes::{sha256, Hash, HashEngine};
17+
use hashes::{sha256, HashEngine};
1818

1919
let tag = "rust-secp256k1DEBUG";
2020

@@ -25,7 +25,7 @@ macro_rules! impl_display_secret {
2525
engine.input(&self.secret_bytes());
2626
let hash = sha256::Hash::from_engine(engine);
2727

28-
f.debug_tuple(stringify!($thing)).field(&format_args!("#{:.16}", hash)).finish()
28+
f.debug_tuple(stringify!($thing)).field(&format_args!("{:?}", hash)).finish()
2929
}
3030
}
3131

0 commit comments

Comments
 (0)