Trait c2_chacha::stream_cipher::FromBlockCipher
source · pub trait FromBlockCipher {
type BlockCipher: BlockCipher;
type NonceSize: ArrayLength<u8>;
// Required method
fn from_block_cipher(
cipher: Self::BlockCipher,
nonce: &GenericArray<u8, Self::NonceSize>,
) -> Self;
}
Expand description
Trait for initializing a stream cipher from a block cipher
Required Associated Types§
sourcetype BlockCipher: BlockCipher
type BlockCipher: BlockCipher
Block cipher
sourcetype NonceSize: ArrayLength<u8>
type NonceSize: ArrayLength<u8>
Nonce size in bytes
Required Methods§
sourcefn from_block_cipher(
cipher: Self::BlockCipher,
nonce: &GenericArray<u8, Self::NonceSize>,
) -> Self
fn from_block_cipher( cipher: Self::BlockCipher, nonce: &GenericArray<u8, Self::NonceSize>, ) -> Self
Instantiate a stream cipher from a block cipher
Object Safety§
This trait is not object safe.