rust-bitcoin-unsafe-fast/hashes/src
Andrew Poelstra 562400a7bc
Merge rust-bitcoin/rust-bitcoin#1593: hashes: Implement AsRef for fixed size arrays
a121e19e94 hashes: Implement AsRef for fixed size arrays (Tobin C. Harding)

Pull request description:

  Implement `AsRef<[u8; X]>` for hash types including wrapped hash types. Doing so means at times the compiler can no longer infer the type because we have `AsRef<[u8]` implemented also but we can use `into_inner` and `as_inner` to get the inner array if needed.

  Fix: #1462

  ## Note

  This touches code that will likely be changed by #1577 and when we do #1491 but I believe its a step forward.

ACKs for top commit:
  arturomf94:
    ACK [`a121e19`](a121e19e94)
  apoelstra:
    ACK a121e19e94
  Kixunil:
    ACK a121e19e94

Tree-SHA512: 257c44826c7649db25bb3a6f023f68b2f17b70c546a056afad044bc8a16bf61f654c3846222505aaf5e6f9a0ad1d2113272d61317b407d0ac83702e41060a1ee
2023-02-17 13:24:57 +00:00
..
cmp.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
error.rs Remove FromHex for all types except Vec and array 2023-02-01 08:26:46 +11:00
hash160.rs hashes: Improve feature gating 2023-02-14 06:23:56 +11:00
hex.rs hashes: Improve feature gating 2023-02-14 06:23:56 +11:00
hmac.rs hashes: Improve feature gating 2023-02-14 06:23:56 +11:00
impls.rs hashes: Implement std::error::Error 2023-02-01 08:22:46 +11:00
internal_macros.rs Merge rust-bitcoin/rust-bitcoin#1593: hashes: Implement AsRef for fixed size arrays 2023-02-17 13:24:57 +00:00
lib.rs Merge rust-bitcoin/rust-bitcoin#1641: Move deny lint checks to script 2023-02-14 19:05:45 +00:00
ripemd160.rs hashes: Improve feature gating 2023-02-14 06:23:56 +11:00
serde_macros.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
sha1.rs hashes: Improve feature gating 2023-02-14 06:23:56 +11:00
sha256.rs hashes: Improve feature gating 2023-02-14 06:23:56 +11:00
sha256d.rs hashes: Improve feature gating 2023-02-14 06:23:56 +11:00
sha256t.rs hashes: Improve feature gating 2023-02-14 06:23:56 +11:00
sha512.rs hashes: Improve feature gating 2023-02-14 06:23:56 +11:00
sha512_256.rs hashes: Improve feature gating 2023-02-14 06:23:56 +11:00
siphash24.rs Use fully qualified path in macro 2023-02-01 08:22:46 +11:00
util.rs Merge rust-bitcoin/rust-bitcoin#1593: hashes: Implement AsRef for fixed size arrays 2023-02-17 13:24:57 +00:00