Skip to content

Commit 63e737f

Browse files
committed
Remove impls of ThirtyTwoByteHash for hashes types
These impls make using secp with hashes and bitcoin difficult during upgrade, or if different versions of the libs get pulled in for any reason. Since we do not use these impls in `rust-bitcoin` (we implement the trait manually for sighash types) lets just remove them for now. Note the implementations were a previous attempt at fixing this problem, we refereed to it as the "dependency hole" because secp the repository is outside of `rust-bitcoin` repo but `hashes` and `bitcoin` are in it. Close: #673
1 parent fb676dc commit 63e737f

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/lib.rs

-15
Original file line numberDiff line numberDiff line change
@@ -198,21 +198,6 @@ pub trait ThirtyTwoByteHash {
198198
fn into_32(self) -> [u8; 32];
199199
}
200200

201-
#[cfg(feature = "hashes")]
202-
impl ThirtyTwoByteHash for hashes::sha256::Hash {
203-
fn into_32(self) -> [u8; 32] { self.to_byte_array() }
204-
}
205-
206-
#[cfg(feature = "hashes")]
207-
impl ThirtyTwoByteHash for hashes::sha256d::Hash {
208-
fn into_32(self) -> [u8; 32] { self.to_byte_array() }
209-
}
210-
211-
#[cfg(feature = "hashes")]
212-
impl<T: hashes::sha256t::Tag> ThirtyTwoByteHash for hashes::sha256t::Hash<T> {
213-
fn into_32(self) -> [u8; 32] { self.to_byte_array() }
214-
}
215-
216201
/// A (hashed) message input to an ECDSA signature.
217202
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
218203
pub struct Message([u8; constants::MESSAGE_SIZE]);

0 commit comments

Comments
 (0)