pub enum AescryptError {
Io(Error),
Crypto(String),
Header(String),
UnsupportedVersion(u8),
}Expand description
The error type for all AES Crypt operations.
This enum covers I/O errors, cryptographic errors, header parsing errors, and version compatibility issues.
Variants§
Io(Error)
I/O error occurred during file operations.
This variant wraps std::io::Error and is automatically created
when I/O operations fail (e.g., file not found, read/write errors).
Crypto(String)
Cryptographic operation failed.
This variant is used for errors in cryptographic operations such as:
- KDF derivation failures
- Invalid password encoding
- HMAC verification failures
- Other cryptographic errors
Header(String)
Header parsing or validation error.
This variant is used for errors related to AES Crypt file headers:
- Invalid magic bytes
- Invalid version byte
- Invalid reserved byte
- Invalid KDF iteration count
- Missing or corrupted header data
UnsupportedVersion(u8)
Unsupported AES Crypt file version.
This variant is returned when attempting to read a file with a version that is not supported (currently only versions 0-3 are supported). The contained value is the unsupported version number.