pub enum SecretstreamError {
InvalidLength,
TagMismatch,
UnknownTag,
StreamFinalized,
Random(RandomError),
}Variants§
InvalidLength
ciphertext_out.len() != plaintext.len() (or the plaintext_out/ciphertext equivalent
on PullState::pull).
TagMismatch
Authentication failed: wrong key, wrong header, tampered ciphertext/tag/tag-byte, or a chunk out of sequence (wrong counter) - reordered, dropped, or spliced from another stream.
UnknownTag
tag_byte passed to PullState::pull was not one of the four values Tag::to_byte
produces.
StreamFinalized
PushState::push/PullState::pull called again after a Tag::Final chunk already
closed this state.
Random(RandomError)
PushState::init’s OS CSPRNG call failed while generating a header.
Trait Implementations§
Source§impl Debug for SecretstreamError
impl Debug for SecretstreamError
Source§impl Display for SecretstreamError
impl Display for SecretstreamError
Source§impl Error for SecretstreamError
impl Error for SecretstreamError
1.30.0 · 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<RandomError> for SecretstreamError
Available on crate features getrandom or std only.
impl From<RandomError> for SecretstreamError
Available on crate features
getrandom or std only.Source§fn from(e: RandomError) -> Self
fn from(e: RandomError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SecretstreamError
impl RefUnwindSafe for SecretstreamError
impl Send for SecretstreamError
impl Sync for SecretstreamError
impl Unpin for SecretstreamError
impl UnsafeUnpin for SecretstreamError
impl UnwindSafe for SecretstreamError
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