Enum zeros::Hash[][src]

pub enum Hash {
    Sha3_224,
    Sha3_256,
    Sha3_384,
    Sha3_512,
    Shake128,
    Shake256,
}

Hash functions

This is used to make new Keccak.

Variants

Sha3_224
Sha3_256
Sha3_384
Sha3_512
Shake128
Shake256

Implementations

impl Hash[src]

pub fn name(&self) -> &str[src]

pub fn new_keccak(&self) -> Keccak

Notable traits for Keccak

impl Write for Keccak
[src]

pub fn new_writer<W>(&self, writer: W) -> HashWriter<W>

Notable traits for HashWriter<W>

impl<W> Write for HashWriter<W> where
    W: Write
where
    W: Write
[src]

👎 Deprecated:

Beta

pub fn new_reader<R>(&self, reader: R) -> HashReader<R>

Notable traits for HashReader<R>

impl<R> Read for HashReader<R> where
    R: Read
where
    R: Read
[src]

👎 Deprecated:

Beta

pub fn hash<B>(&self, bytes: B) -> Vec<u8> where
    B: AsRef<[u8]>, 
[src]

Hashes input bytes

This can be used for small amount of data. For large data, see new_keccak().

pub fn hash_as_hex<B>(&self, bytes: B) -> String where
    B: AsRef<[u8]>, 
[src]

Hashes input bytes and returns hash as a hexadecimal string, in lower-case

This can be used for small amount of data. For large data, see new_keccak().

Trait Implementations

impl Clone for Hash[src]

impl Debug for Hash[src]

impl Display for Hash[src]

impl Eq for Hash[src]

impl From<&'_ Hash> for Keccak[src]

impl From<Hash> for Keccak[src]

impl Hash for Hash[src]

impl PartialEq<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, U> Into<U> for T where
    U: From<T>, 
[src]

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.