use std::io;
pub type Result<T> = std::result::Result<T, VeraError>;
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum VeraError {
#[error("authentication failed: no PRF/cipher decrypted a valid VeraCrypt header (wrong password or unsupported cipher)")]
AuthenticationFailed,
#[error("too small for a VeraCrypt header: {got} bytes (need at least 512)")]
TooSmall {
got: usize,
},
#[error("crypto error: {what}")]
Crypto {
what: &'static str,
},
#[error("I/O error: {0}")]
Io(#[from] io::Error),
}