[][src]Trait threefish_cipher::NewBlockCipher

pub trait NewBlockCipher {
    type KeySize: ArrayLength<u8>;
    fn new(key: &GenericArray<u8, Self::KeySize>) -> Self;

    fn new_varkey(key: &[u8]) -> Result<Self, InvalidKeyLength> { ... }
}

Instantiate a BlockCipher algorithm.

Associated Types

type KeySize: ArrayLength<u8>

Key size in bytes with which cipher guaranteed to be initialized.

Loading content...

Required methods

fn new(key: &GenericArray<u8, Self::KeySize>) -> Self

Create new block cipher instance from key with fixed size.

Loading content...

Provided methods

fn new_varkey(key: &[u8]) -> Result<Self, InvalidKeyLength>

Create new block cipher instance from key with variable size.

Default implementation will accept only keys with length equal to KeySize, but some ciphers can accept range of key lengths.

Loading content...

Implementors

impl NewBlockCipher for Threefish256[src]

type KeySize = U32

impl NewBlockCipher for Threefish512[src]

type KeySize = U64

impl NewBlockCipher for Threefish1024[src]

type KeySize = U128

Loading content...