forked from rust-bitcoin/rust-secp256k1
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The implementations of `ThirtyTwoByteHash` for types from the `hashes` crate are problematic during upgrades because both `bitcoin` and `secp256k1` depend on `hashes` and when the versions of `hashes` get out of sync usage of the trait breaks. In order to resolve this issue stop implementing `ThirtyTwoByteHash` for the `hashes` types, this means also that we cannot use the `hashes::Hash` trait bound when implementing `from_hashed_data` for `SecretKey` or `Message` (because of the bound on `From`). We can still provide the `from_hashed_data` helper function but we now restrict it to only hashing with `sha256` instead of a generic hasher. Users can still create the `Message` and `SecretKey` types from other hashes but to do so they must do it manually, this is documented in the update rustdocs for each function.
- Loading branch information
Showing
2 changed files
with
14 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters