[][src]Struct pwbox::rcrypto::Keccak256

pub struct Keccak256(_);
This is supported on crate feature rust-crypto only.

MAC construction based on Keccak256 hash function.

This MAC is used as a part of Ethereum keystores.

Specification

Mac(key, message) = Keccak256(key || message)

where || denotes concatenation of byte arrays.

Theoretical note

This construction is only secure because hash functions from Keccak/SHA-3 family are resistant to length extension attacks. Implementing a similar construction based on functions from the SHA-2 family or other hash functions susceptible to length extension attacks is not secure; use an HMAC instead.

Trait Implementations

impl Debug for Keccak256[src]

impl Mac for Keccak256[src]

Auto Trait Implementations

impl RefUnwindSafe for Keccak256

impl Send for Keccak256

impl Sync for Keccak256

impl Unpin for Keccak256

impl UnwindSafe for Keccak256

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> Same<T> for T

type Output = T

Should always be Self

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.