Trait tiny_crypto::sym::Cipher
source · pub trait Cipher {
type KeyBytes;
// Required methods
fn from_key_array(key: &Self::KeyBytes) -> Self;
fn encrypt_with_iv(&self, iv: &Self::KeyBytes, input: &[u8]) -> Vec<u8>;
fn decrypt_with_iv(&self, iv: &Self::KeyBytes, input: &[u8]) -> Vec<u8>;
}Expand description
The trait for symmetric cipher.
Required Associated Types§
Required Methods§
fn from_key_array(key: &Self::KeyBytes) -> Self
fn encrypt_with_iv(&self, iv: &Self::KeyBytes, input: &[u8]) -> Vec<u8>
fn decrypt_with_iv(&self, iv: &Self::KeyBytes, input: &[u8]) -> Vec<u8>
Object Safety§
This trait is not object safe.