pub trait OreCipher: Sized {
type LeftBlockType: CipherTextBlock;
type RightBlockType: CipherTextBlock;
// Required methods
fn init(k1: &[u8; 16], k2: &[u8; 16]) -> Result<Self, OreError>;
fn encrypt_left<const N: usize>(
&self,
input: &PlainText<N>,
) -> Result<Left<Self, N>, OreError>;
fn encrypt<const N: usize>(
&self,
input: &PlainText<N>,
) -> Result<CipherText<Self, N>, OreError>;
fn compare_raw_slices(a: &[u8], b: &[u8]) -> Option<Ordering>;
}
Required Associated Types§
Required Methods§
fn init(k1: &[u8; 16], k2: &[u8; 16]) -> Result<Self, OreError>
fn encrypt_left<const N: usize>( &self, input: &PlainText<N>, ) -> Result<Left<Self, N>, OreError>
fn encrypt<const N: usize>( &self, input: &PlainText<N>, ) -> Result<CipherText<Self, N>, OreError>
fn compare_raw_slices(a: &[u8], b: &[u8]) -> Option<Ordering>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.