pub struct Hash(/* private fields */);Expand description
Output of the SipHash24 hash function.
Implementations§
Source§impl Hash
impl Hash
Sourcepub fn forward_hex(&self) -> impl '_ + LowerHex + UpperHex
pub fn forward_hex(&self) -> impl '_ + LowerHex + UpperHex
Displays hex forwards, regardless of how this type would display it naturally.
This is mainly intended as an internal method and you shouldn’t need it unless you’re doing something special.
Sourcepub fn backward_hex(&self) -> impl '_ + LowerHex + UpperHex
pub fn backward_hex(&self) -> impl '_ + LowerHex + UpperHex
Displays hex backwards, regardless of how this type would display it naturally.
This is mainly intended as an internal method and you shouldn’t need it unless you’re doing something special.
Sourcepub fn from_bytes_ref(bytes: &[u8; 8]) -> &Self
pub fn from_bytes_ref(bytes: &[u8; 8]) -> &Self
Zero cost conversion between a fixed length byte array shared reference and a shared reference to this Hash type.
Sourcepub fn from_bytes_mut(bytes: &mut [u8; 8]) -> &mut Self
pub fn from_bytes_mut(bytes: &mut [u8; 8]) -> &mut Self
Zero cost conversion between a fixed length byte array exclusive reference and an exclusive reference to this Hash type.
Source§impl Hash
impl Hash
Sourcepub fn hash_with_keys(k0: u64, k1: u64, data: &[u8]) -> Hash
pub fn hash_with_keys(k0: u64, k1: u64, data: &[u8]) -> Hash
Hashes the given data with an engine with the provided keys.
Sourcepub fn hash_to_u64_with_keys(k0: u64, k1: u64, data: &[u8]) -> u64
pub fn hash_to_u64_with_keys(k0: u64, k1: u64, data: &[u8]) -> u64
Hashes the given data directly to u64 with an engine with the provided keys.
Sourcepub fn from_engine_to_u64(e: HashEngine) -> u64
pub fn from_engine_to_u64(e: HashEngine) -> u64
Produces a hash as u64 from the current state of a given engine.
Trait Implementations§
Source§impl Hash for Hash
impl Hash for Hash
Source§const DISPLAY_BACKWARD: bool = false
const DISPLAY_BACKWARD: bool = false
Sha256dHash, so here we are.Source§type Engine = HashEngine
type Engine = HashEngine
io::Write trait, and to never return errors under
any conditions.