pub mod pc; #[derive(Debug)] pub enum CipherError { InvalidSize } pub trait PSOCipher { fn encrypt(&mut self, data: &Vec) -> Result, CipherError>; fn decrypt(&mut self, data: &Vec) -> Result, CipherError>; } pub struct NullCipher { } impl PSOCipher for NullCipher { fn encrypt(&mut self, data: &Vec) -> Result, CipherError> { Ok(data.clone()) } fn decrypt(&mut self, data: &Vec) -> Result, CipherError> { Ok(data.clone()) } }