[][src]Trait pwbox::Mac

pub trait Mac: 'static {
    const KEY_LEN: usize;
    const MAC_LEN: usize;

    fn digest(key: &[u8], message: &[u8]) -> Vec<u8>

Notable traits for Vec<u8>

impl Write for Vec<u8>
; }

Message authentication code.

Associated Constants

const KEY_LEN: usize

Byte size of a MAC key.

const MAC_LEN: usize

Byte size of the MAC output.

Loading content...

Required methods

fn digest(key: &[u8], message: &[u8]) -> Vec<u8>

Notable traits for Vec<u8>

impl Write for Vec<u8>

Digests a message under the specified key.

The output of this method must have size MAC_LEN.

Safety

When used within PwBox, key is guaranteed to have the correct size.

Loading content...

Implementors

impl Mac for Keccak256[src]

Loading content...