Merge rust-bitcoin/rust-bitcoin#4003: Add engine function to `siphash24::Hash`
51cb36881f
api: Run just check-api (Tobin C. Harding)1bcfc80fe7
Add engine function to siphash24::Hash (Tobin C. Harding) Pull request description: The other hashes that require initial state (keys etc) both have an `engine` function on the hash type because they cannot use the `GeneralHash::engine` function. Add an `engine` function to the `siphash24::Hash` type. ACKs for top commit: apoelstra: ACK 51cb36881f5291daa4136a714c286cf01f968cf0; successfully ran local tests Tree-SHA512: 5cafa5b717235e94167b98a7ff675c3bde5071e736cdc4515ae534b517a5a96eead2bebd25b5dc0123e5e8615bb191c6990ae1ea7dea59b1b58d72547514b5b5
This commit is contained in:
commit
511ac2c47c
|
@ -967,6 +967,7 @@ pub fn bitcoin_hashes::siphash24::Hash::borrow(&self) -> &[u8]
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::clone(&self) -> bitcoin_hashes::siphash24::Hash
|
pub fn bitcoin_hashes::siphash24::Hash::clone(&self) -> bitcoin_hashes::siphash24::Hash
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::cmp(&self, other: &bitcoin_hashes::siphash24::Hash) -> core::cmp::Ordering
|
pub fn bitcoin_hashes::siphash24::Hash::cmp(&self, other: &bitcoin_hashes::siphash24::Hash) -> core::cmp::Ordering
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::deserialize<D: serde::de::Deserializer<'de>>(d: D) -> core::result::Result<bitcoin_hashes::siphash24::Hash, <D as serde::de::Deserializer>::Error>
|
pub fn bitcoin_hashes::siphash24::Hash::deserialize<D: serde::de::Deserializer<'de>>(d: D) -> core::result::Result<bitcoin_hashes::siphash24::Hash, <D as serde::de::Deserializer>::Error>
|
||||||
|
pub fn bitcoin_hashes::siphash24::Hash::engine(k0: u64, k1: u64) -> bitcoin_hashes::siphash24::HashEngine
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::eq(&self, other: &bitcoin_hashes::siphash24::Hash) -> bool
|
pub fn bitcoin_hashes::siphash24::Hash::eq(&self, other: &bitcoin_hashes::siphash24::Hash) -> bool
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
pub fn bitcoin_hashes::siphash24::Hash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::from_byte_array(bytes: Self::Bytes) -> Self
|
pub fn bitcoin_hashes::siphash24::Hash::from_byte_array(bytes: Self::Bytes) -> Self
|
||||||
|
|
|
@ -831,6 +831,7 @@ pub fn bitcoin_hashes::siphash24::Hash::borrow(&self) -> &[u8; 8]
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::borrow(&self) -> &[u8]
|
pub fn bitcoin_hashes::siphash24::Hash::borrow(&self) -> &[u8]
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::clone(&self) -> bitcoin_hashes::siphash24::Hash
|
pub fn bitcoin_hashes::siphash24::Hash::clone(&self) -> bitcoin_hashes::siphash24::Hash
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::cmp(&self, other: &bitcoin_hashes::siphash24::Hash) -> core::cmp::Ordering
|
pub fn bitcoin_hashes::siphash24::Hash::cmp(&self, other: &bitcoin_hashes::siphash24::Hash) -> core::cmp::Ordering
|
||||||
|
pub fn bitcoin_hashes::siphash24::Hash::engine(k0: u64, k1: u64) -> bitcoin_hashes::siphash24::HashEngine
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::eq(&self, other: &bitcoin_hashes::siphash24::Hash) -> bool
|
pub fn bitcoin_hashes::siphash24::Hash::eq(&self, other: &bitcoin_hashes::siphash24::Hash) -> bool
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
pub fn bitcoin_hashes::siphash24::Hash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::from_byte_array(bytes: Self::Bytes) -> Self
|
pub fn bitcoin_hashes::siphash24::Hash::from_byte_array(bytes: Self::Bytes) -> Self
|
||||||
|
|
|
@ -780,6 +780,7 @@ pub fn bitcoin_hashes::siphash24::Hash::borrow(&self) -> &[u8; 8]
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::borrow(&self) -> &[u8]
|
pub fn bitcoin_hashes::siphash24::Hash::borrow(&self) -> &[u8]
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::clone(&self) -> bitcoin_hashes::siphash24::Hash
|
pub fn bitcoin_hashes::siphash24::Hash::clone(&self) -> bitcoin_hashes::siphash24::Hash
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::cmp(&self, other: &bitcoin_hashes::siphash24::Hash) -> core::cmp::Ordering
|
pub fn bitcoin_hashes::siphash24::Hash::cmp(&self, other: &bitcoin_hashes::siphash24::Hash) -> core::cmp::Ordering
|
||||||
|
pub fn bitcoin_hashes::siphash24::Hash::engine(k0: u64, k1: u64) -> bitcoin_hashes::siphash24::HashEngine
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::eq(&self, other: &bitcoin_hashes::siphash24::Hash) -> bool
|
pub fn bitcoin_hashes::siphash24::Hash::eq(&self, other: &bitcoin_hashes::siphash24::Hash) -> bool
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
pub fn bitcoin_hashes::siphash24::Hash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
|
||||||
pub fn bitcoin_hashes::siphash24::Hash::from_byte_array(bytes: Self::Bytes) -> Self
|
pub fn bitcoin_hashes::siphash24::Hash::from_byte_array(bytes: Self::Bytes) -> Self
|
||||||
|
|
|
@ -168,6 +168,9 @@ impl crate::HashEngine for HashEngine {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Hash {
|
impl Hash {
|
||||||
|
/// Constructs a new SipHash24 engine with keys.
|
||||||
|
pub fn engine(k0: u64, k1: u64) -> HashEngine { HashEngine::with_keys(k0, k1) }
|
||||||
|
|
||||||
/// Produces a hash from the current state of a given engine.
|
/// Produces a hash from the current state of a given engine.
|
||||||
pub fn from_engine(e: HashEngine) -> Hash { from_engine(e) }
|
pub fn from_engine(e: HashEngine) -> Hash { from_engine(e) }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue