use thiserror::Error;
#[cfg(feature = "zipcrypto")]
pub mod zipcrypto;
#[derive(Error, Debug)]
pub enum DecryptionError {
#[error("generic decryption error: {0}")]
Generic(String)
}
#[derive(Error, Debug)]
pub enum DecryptorCreationError {
#[error("generic decryptor creation error: {0}")]
Generic(String),
#[error("incorrect password")]
IncorrectPassword,
#[error("data is not encrypted")]
NotEncrypted
}
pub trait Decryptor: std::fmt::Debug + Send + Sync {
fn update(&mut self, data: &[u8]) -> Result<(usize, &[u8]), DecryptionError>;
}