Trait cipher::stream::NewStreamCipher [−][src]
pub trait NewStreamCipher: Sized {
type KeySize: ArrayLength<u8>;
type NonceSize: ArrayLength<u8>;
fn new(key: &Key<Self>, nonce: &Nonce<Self>) -> Self;
fn new_var(key: &[u8], nonce: &[u8]) -> Result<Self, InvalidKeyNonceLength> { ... }
}
Expand description
Stream cipher creation trait.
It can be used for creation of synchronous and asynchronous ciphers.
Associated Types
type KeySize: ArrayLength<u8>
type KeySize: ArrayLength<u8>
Key size in bytes
type NonceSize: ArrayLength<u8>
type NonceSize: ArrayLength<u8>
Nonce size in bytes