Merge rust-bitcoin/rust-secp256k1#731: Stop indexing hash types

f0100e1c55 Stop indexing hash types (Tobin C. Harding)

Pull request description:

  In preparation for removing `SliceIndex` from hash type impls (in `bitcoin_hashes`) lets stop indexing hash types here.

  Internal change only.

ACKs for top commit:
  jlest01:
    ACK f0100e1c55
  Kixunil:
    ACK f0100e1c55
  apoelstra:
    ACK f0100e1c55 successfully ran local tests

Tree-SHA512: 196d83326f8d62bb095c39a67083d3f8daca65b458abffc92ebec469a6213d03003786d046f795f8b082d8e94fc1a0f7f4d5f8c66021785fb79cbbdeed8042f7
This commit is contained in:
merge-script 2024-09-05 14:29:57 +00:00
commit 652cacef5e
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 2 additions and 2 deletions

View File

@ -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);