use thiserror::Error;
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq, Eq, Error)]
pub enum Error {
#[error("key must be 64 bytes")]
InvalidKeyLength,
#[error("invalid hex key (expected 128 hex characters)")]
InvalidHex,
#[error("unknown scheme")]
UnknownScheme,
#[error("encryption failed")]
EncryptionFailed,
#[error("encryption failed: empty plaintext")]
EmptyPlaintext,
#[error("decryption failed")]
DecryptionFailed,
#[error("decryption failed: empty payload")]
EmptyPayload,
#[error("decryption failed: payload too short")]
PayloadTooShort,
}