rust-bitcoin-unsafe-fast/hashes/src
merge-script 76ea4eb400
Merge rust-bitcoin/rust-bitcoin#3298: hashes: Rename length field and use u64
cbfddb0394 hashes: Rename length field and use u64 (Tobin C. Harding)

Pull request description:

  The hash engine types have a `length` field that is used to cache the number of bytes hashed so far, as such it is an arbitrary number and could use a `u64` instead of `usize`.

  While we are at it rename `length` to `bytes_hashed` to remove any ambiguity of what this field is. Note this field is private, we already have the public getter `n_bytes_hashes` to get the value.

  Introduce a private function `incomplete_block_size`, the purpose of this function is to put all the casts in one place so they can be well documented and easily understood.

  Fix: #3016

ACKs for top commit:
  apoelstra:
    ACK cbfddb0394 successfully ran local tests

Tree-SHA512: a9d932938afcbd6dfb9db471a02fa7e3fff8f0659906627001ad241390b9af57088fd34afeae551c70c2c49783e6296f110b57ff9de6fed2609f4648ec8fd934
2024-09-23 20:10:09 +00:00
..
cmp.rs hashes: Put test function in a module 2024-09-12 15:28:41 +10:00
hash160.rs hashes: Rename length field and use u64 2024-09-09 14:46:38 +10:00
hkdf.rs 2024-09-08 automated rustfmt nightly 2024-09-08 01:17:12 +00:00
hmac.rs Merge rust-bitcoin/rust-bitcoin#3298: hashes: Rename length field and use u64 2024-09-23 20:10:09 +00:00
impls.rs Remove hashes io feature 2024-09-09 06:37:49 +10:00
internal_macros.rs Use UFCS in macros 2024-09-14 09:46:57 +02:00
lib.rs Merge rust-bitcoin/rust-bitcoin#3298: hashes: Rename length field and use u64 2024-09-23 20:10:09 +00:00
ripemd160.rs hashes: Rename length field and use u64 2024-09-09 14:46:38 +10:00
serde_macros.rs Use UFCS in macros 2024-09-14 09:46:57 +02:00
sha1.rs hashes: Rename length field and use u64 2024-09-09 14:46:38 +10:00
sha256.rs hashes: Rename length field and use u64 2024-09-09 14:46:38 +10:00
sha256d.rs hashes: Rename length field and use u64 2024-09-09 14:46:38 +10:00
sha256t.rs Deprecate `from_slice()` in sha256.rs 2024-09-06 12:33:52 +01:00
sha384.rs hashes: Rename length field and use u64 2024-09-09 14:46:38 +10:00
sha512.rs hashes: Rename length field and use u64 2024-09-09 14:46:38 +10:00
sha512_256.rs hashes: Rename length field and use u64 2024-09-09 14:46:38 +10:00
siphash24.rs Merge rust-bitcoin/rust-bitcoin#3298: hashes: Rename length field and use u64 2024-09-23 20:10:09 +00:00
util.rs hashes: Rename length field and use u64 2024-09-09 14:46:38 +10:00