pub mod cli;
mod run;
pub use run::run;
pub mod compress;
pub mod crypto;
pub mod steganography;
pub mod image_api;
use thiserror::Error;
#[derive(Error, Debug, Eq, PartialEq)]
pub enum StegError {
#[error("Encoded message not found in data")]
EncodingNotFound,
#[error("Error decoding message: `{0}`")]
Decoding(String),
#[error("Compression error")]
Compression(#[from] compression::prelude::CompressionError),
#[error("Decompression error")]
Decompression(#[from] compression::prelude::BZip2Error),
#[error("Encryption error")]
Crypto(#[from] CryptoError),
#[error("Unknown steganography error")]
Unknown,
}
#[derive(Error, Debug, Eq, PartialEq)]
pub enum CryptoError {
#[error("Failed to get random salt")]
Salt,
#[error("Failed to hash password")]
PasswordHash,
#[error("Error creating cipher")]
Cipher(#[from] aes::cipher::InvalidLength),
#[error("Error decrypting ciphertext: `{0}`")]
Decryption(String),
#[error("unknown cryptography error")]
Unknown,
}