pub enum StegoError {
Show 13 variants
Io(Error),
Image(ImageError),
InvalidConfig(String),
InvalidHeader,
AuthenticationFailed,
IntegrityCheckFailed,
InsufficientCapacity {
needed: usize,
available: usize,
},
MissingChunks {
found: usize,
expected: usize,
},
DuplicateChunk(u8),
MixedMessages,
InvalidBitsPerChannel(u8),
Kdf(String),
Cipher(String),
}Expand description
Errors returned by StegoRust operations.
Variants§
Io(Error)
An I/O error occurred.
Image(ImageError)
An image loading or saving error occurred.
InvalidConfig(String)
Invalid configuration parameter.
InvalidHeader
The header bytes are corrupt or the image is not a StegoRust carrier.
AuthenticationFailed
Decryption failed — wrong password or tampered image.
IntegrityCheckFailed
The reassembled payload hash does not match the stored hash.
InsufficientCapacity
Not enough pixel capacity in the cover images for the message.
MissingChunks
The provided images do not supply all required chunks.
DuplicateChunk(u8)
A duplicate chunk index was encountered.
MixedMessages
Images from different messages were mixed together.
InvalidBitsPerChannel(u8)
bits_per_channel was outside the valid range 1–8.
Kdf(String)
Key derivation (Argon2 / HKDF) error.
Cipher(String)
Cipher (AES-GCM) error.
Trait Implementations§
Source§impl Debug for StegoError
impl Debug for StegoError
Source§impl Display for StegoError
impl Display for StegoError
Source§impl Error for StegoError
impl Error for StegoError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for StegoError
impl From<Error> for StegoError
Source§impl From<ImageError> for StegoError
impl From<ImageError> for StegoError
Source§fn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StegoError
impl !RefUnwindSafe for StegoError
impl Send for StegoError
impl Sync for StegoError
impl Unpin for StegoError
impl UnsafeUnpin for StegoError
impl !UnwindSafe for StegoError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more