Skip to content

Commit

Permalink
Stop indexing hash types
Browse files Browse the repository at this point in the history
In preparation for removing `SliceIndex` from hash type impls (in
`bitcoin_hashes`) lets stop indexing hash types here.

(Done mainly because I can't remember right now how to get secp to stop
using local version of hashes when developing patches in
`rust-bitcoin` and it needs doing eventually anyways.)
  • Loading branch information
tcharding committed Sep 5, 2024
1 parent 59f122d commit a3d97bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/secret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ macro_rules! impl_display_secret {

let mut engine = sha256::Hash::engine();
let tag_hash = sha256::Hash::hash(tag.as_bytes());
engine.input(&tag_hash[..]);
engine.input(&tag_hash[..]);
engine.input(&tag_hash.as_ref());
engine.input(&tag_hash.as_ref());
engine.input(&self.secret_bytes());
let hash = sha256::Hash::from_engine(engine);

Expand Down

0 comments on commit a3d97bf

Please sign in to comment.