[][src]Struct tiny_keccak::Keccak

pub struct Keccak { /* fields omitted */ }

The Keccak hash functions.

Methods

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 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);

impl Clone for Keccak[src]

Auto Trait Implementations

impl Unpin for Keccak

impl Send for Keccak

impl Sync for Keccak

Blanket Implementations

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

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.

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

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

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