diff --git a/src/crypto/mod.rs b/src/crypto/mod.rs index 9267e49..82e0ea1 100644 --- a/src/crypto/mod.rs +++ b/src/crypto/mod.rs @@ -1,4 +1,4 @@ -mod pc; +pub mod pc; #[derive(Debug)] @@ -8,7 +8,22 @@ pub enum CipherError { -trait PSOCipher { +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()) + } +}