pub mod encryptor;
pub mod signer;
pub use {encryptor::CryptoAlgorithm, signer::SignatureAlgorithm};
use crate::Error;
pub type SymmetricCypherMethod = Box<dyn Fn(&[u8], &[u8], &[u8], &[u8]) -> Result<Vec<u8>, Error>>;
pub type AsymmetricCypherMethod = Box<dyn Fn(&[u8], &[u8], &[u8], &[u8]) -> Result<Vec<u8>, Error>>;
pub type SigningMethod = Box<dyn Fn(&[u8], &[u8]) -> Result<Vec<u8>, Error>>;
pub type ValidationMethod = Box<dyn Fn(&[u8], &[u8], &[u8]) -> Result<bool, Error>>;
pub trait Cypher {
fn encryptor(&self) -> SymmetricCypherMethod;
fn decrypter(&self) -> SymmetricCypherMethod;
fn asymmetric_encryptor(&self) -> AsymmetricCypherMethod;
}
pub trait Signer {
fn signer(&self) -> SigningMethod;
fn validator(&self) -> ValidationMethod;
}