[][src]Struct bitcoin_hashes::siphash24::Hash

pub struct Hash(_);

Output of the SipHash24 hash function.

Methods

impl Hash[src]

pub fn hash_with_keys(k0: u64, k1: u64, data: &[u8]) -> Hash[src]

Hash the given data with an engine with the provided keys.

pub fn hash_to_u64_with_keys(k0: u64, k1: u64, data: &[u8]) -> u64[src]

Hash the given data directly to u64 with an engine with the provided keys.

pub fn from_engine_to_u64(e: HashEngine) -> u64[src]

Produce a hash as u64 from the current state of a given engine

pub fn as_u64(&self) -> u64[src]

Returns the (little endian) 64-bit integer representation of the hash value.

pub fn from_u64(hash: u64) -> Hash[src]

Create a hash from its (little endian) 64-bit integer representation.

Trait Implementations

impl AsRef<[u8]> for Hash[src]

impl Borrow<[u8]> for Hash[src]

impl Clone for Hash[src]

impl Copy for Hash[src]

impl Debug for Hash[src]

impl Default for Hash[src]

impl Deref for Hash[src]

type Target = [u8]

The resulting type after dereferencing.

impl Display for Hash[src]

impl Eq for Hash[src]

impl FromStr for Hash[src]

type Err = Error

The associated error which can be returned from parsing.

impl Hash for Hash[src]

type Engine = HashEngine

A hashing engine which bytes can be serialized into. It is expected to implement the io::Write trait, and to never return errors under any conditions. Read more

type Inner = [u8; 8]

The byte array that represents the hash internally

impl Hash for Hash[src]

impl Index<Range<usize>> for Hash[src]

type Output = [u8]

The returned type after indexing.

impl Index<RangeFrom<usize>> for Hash[src]

type Output = [u8]

The returned type after indexing.

impl Index<RangeFull> for Hash[src]

type Output = [u8]

The returned type after indexing.

impl Index<RangeTo<usize>> for Hash[src]

type Output = [u8]

The returned type after indexing.

impl Index<usize> for Hash[src]

type Output = u8

The returned type after indexing.

impl LowerHex for Hash[src]

impl Ord for Hash[src]

impl PartialEq<Hash> for Hash[src]

impl PartialOrd<Hash> for Hash[src]

impl StructuralEq for Hash[src]

impl StructuralPartialEq for Hash[src]

Auto Trait Implementations

impl RefUnwindSafe for Hash

impl Send for Hash

impl Sync for Hash

impl Unpin for Hash

impl UnwindSafe for Hash

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FromHex for T where
    T: Hash
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToHex for T where
    T: LowerHex
[src]

fn to_hex(&Self) -> String[src]

Outputs the hash in hexadecimal form

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.