Struct tiny_keccak::Keccak[][src]

pub struct Keccak { /* fields omitted */ }

The Keccak hash functions defined in Keccak SHA3 submission.

Usage

[dependencies]
tiny-keccak = { version = "2.0.0", features = ["keccak"] }

Implementations

impl Keccak[src]

pub fn v224() -> Keccak[src]

Creates new Keccak hasher with a security level of 224 bits.

pub fn v256() -> Keccak[src]

Creates new Keccak hasher with a security level of 256 bits.

pub fn v384() -> Keccak[src]

Creates new Keccak hasher with a security level of 384 bits.

pub fn v512() -> Keccak[src]

Creates new Keccak hasher with a security level of 512 bits.

Trait Implementations

impl Clone for Keccak[src]

impl Hasher for Keccak[src]

fn update(&mut self, input: &[u8])[src]

Absorb additional input. Can be called multiple times.

Example

keccak.update(b"hello");
keccak.update(b" world");

fn finalize(self, output: &mut [u8])[src]

Pad and squeeze the state to the output.

Example

keccak.finalize(&mut output);

Auto Trait Implementations

impl RefUnwindSafe for Keccak

impl Send for Keccak

impl Sync for Keccak

impl Unpin for Keccak

impl UnwindSafe for Keccak

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, 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.