[][src]Struct tiny_keccak::Kmac

pub struct Kmac { /* fields omitted */ }

The KMAC pseudo-random functions defined in SP800-185.

The KECCAK Message Authentication Code (KMAC) algorithm is a PRF and keyed hash function based on KECCAK. It provides variable-length output, and unlike SHAKE and cSHAKE, altering the requested output length generates a new, unrelated output. KMAC has two variants, KMAC128 and KMAC256, built from cSHAKE128 and cSHAKE256, respectively. The two variants differ somewhat in their technical security properties.

Methods

impl Kmac[src]

pub fn v128(key: &[u8], custom_string: &[u8]) -> Kmac[src]

Creates new Kmac hasher with a security level of 128 bits.

pub fn v256(key: &[u8], custom_string: &[u8]) -> Kmac[src]

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

Trait Implementations

impl Hasher for Kmac[src]

impl IntoXof for Kmac[src]

type Xof = KmacXof

A type implementing [Xof], eXtendable-output function interface. Read more

impl Clone for Kmac[src]

Auto Trait Implementations

impl Unpin for Kmac

impl Send for Kmac

impl Sync for Kmac

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]