Trait aes::NewBlockCipher [−][src]
Instantiate a BlockCipher
algorithm.
Associated Types
type KeySize: ArrayLength<u8>
[src]
Key size in bytes with which cipher guaranteed to be initialized.
Required methods
pub fn new(key: &GenericArray<u8, Self::KeySize>) -> Self
[src]
Create new block cipher instance from key with fixed size.
Provided methods
pub fn new_varkey(key: &[u8]) -> Result<Self, InvalidKeyLength>
[src]
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.
Implementors
impl NewBlockCipher for Aes128
[src]
type KeySize = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>
pub fn new(
key: &GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
) -> Aes128
[src]
key: &GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
) -> Aes128
impl NewBlockCipher for Aes192
[src]
type KeySize = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>
pub fn new(
key: &GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>>
) -> Aes192
[src]
key: &GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>>
) -> Aes192