GenericKey

Trait GenericKey 

Source
pub trait GenericKey: Sealed {
    type Size: KeySz;

    // Required methods
    fn size(&self) -> u32;
    fn cleanup(self);
}
Expand description

Represents a valid key for the associated hashing algorithm..

Required Associated Types§

Source

type Size: KeySz

The desired size of the key.

Required Methods§

Source

fn size(&self) -> u32

Returns the size of the key in bytes.

Source

fn cleanup(self)

Zeroes the memory of the key if is owned.

Implementations on Foreign Types§

Source§

impl GenericKey for &[u8; 16]

Source§

type Size = U16

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Source§

impl GenericKey for &[u8; 20]

Source§

type Size = U20

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Source§

impl GenericKey for &[u8; 28]

Source§

type Size = U28

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Source§

impl GenericKey for &[u8; 32]

Source§

type Size = U32

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Source§

impl GenericKey for &[u8; 48]

Source§

type Size = U48

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Source§

impl GenericKey for &[u8; 64]

Source§

type Size = U64

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Source§

impl GenericKey for [u8; 16]

Source§

type Size = U16

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Source§

impl GenericKey for [u8; 20]

Source§

type Size = U20

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Source§

impl GenericKey for [u8; 28]

Source§

type Size = U28

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Source§

impl GenericKey for [u8; 32]

Source§

type Size = U32

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Source§

impl GenericKey for [u8; 48]

Source§

type Size = U48

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Source§

impl GenericKey for [u8; 64]

Source§

type Size = U64

Source§

fn size(&self) -> u32

Source§

fn cleanup(self)

Implementors§

Source§

impl<'k, SZ: KeySz> GenericKey for InsecureKey<'k, SZ>

Source§

type Size = SZ

Source§

impl<'k, SZ: KeySz> GenericKey for KeySlice<'k, SZ>

Source§

type Size = SZ