use crate::types::*;
pub mod sodium;
pub use sodium::*;
#[cfg(feature = "crypto-dalek")]
pub mod dalek;
pub trait Signer {
type Error;
fn sign(&mut self, id: &Id, data: &[u8]) -> Result<Signature, Self::Error>;
}
pub trait Validator {
type Error;
fn validate(&self, id: &Id, sig: &Signature, data: &[u8]) -> Result<bool, Self::Error>;
}
pub trait Encrypter {
type Error;
fn encrypt(&mut self, id: &Id, key: &SecretKey, data: &mut [u8]) -> Result<(), Self::Error>;
}
pub trait Decrypter {
type Error;
fn decrypt(&mut self, id: &Id, key: &SecretKey, data: &mut [u8]) -> Result<(), Self::Error>;
}