#[non_exhaustive]pub enum KeyDataFailure {
UnusableWrapParameters {
kind: u32,
memory: u32,
time: u32,
parallelism: u32,
},
BadSalt {
size: usize,
},
BadTrailerMagic,
BadWrapCount {
count: u32,
},
BadKdfFamily {
kind: u32,
},
BadWrapSaltSize {
size: usize,
},
DuplicateWrapGeneration {
generation: u32,
},
AccountsInfoDecrypt,
BadAccountsCount {
count: i32,
},
}Expand description
What an Error::KeyDataInvalid was raised for (crate::tdata::key_data
and crate::tdata::TData::load).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnusableWrapParameters
The parameters of a passcode wrap cannot make a passcode key
(create_passcode_key), or the passcode is empty.
Fields
BadSalt
The open salt of the key file has the wrong size.
BadTrailerMagic
The trailer does not start with the key data magic.
BadWrapCount
The trailer holds more wraps than its format allows.
BadKdfFamily
A wrap within the cost caps has parameters its KDF does not accept.
BadWrapSaltSize
A wrap salt is shorter than the passcode salt minimum.
DuplicateWrapGeneration
Two wraps share a generation.
AccountsInfoDecrypt
The accounts info does not decrypt under the local key.
BadAccountsCount
The accounts info lists no account (raised as a plain
OpenTeleException with this text).
Trait Implementations§
Source§impl Clone for KeyDataFailure
impl Clone for KeyDataFailure
impl Copy for KeyDataFailure
Source§impl Debug for KeyDataFailure
impl Debug for KeyDataFailure
impl Eq for KeyDataFailure
Source§impl Hash for KeyDataFailure
impl Hash for KeyDataFailure
Source§impl PartialEq for KeyDataFailure
impl PartialEq for KeyDataFailure
impl StructuralPartialEq for KeyDataFailure
Auto Trait Implementations§
impl Freeze for KeyDataFailure
impl RefUnwindSafe for KeyDataFailure
impl Send for KeyDataFailure
impl Sync for KeyDataFailure
impl Unpin for KeyDataFailure
impl UnsafeUnpin for KeyDataFailure
impl UnwindSafe for KeyDataFailure
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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