#[repr(C)]pub struct EncKey {
pub pkalg: [u8; 2],
pub kdfalg: [u8; 2],
pub kdfrounds: u32,
pub salt: [u8; 16],
pub checksum: [u8; 8],
pub keynum: [u8; 8],
pub seckey: Zeroizing<[u8; 64]>,
}Expand description
Encrypted secret key structure.
Stores the encrypted secret key along with KDF parameters and checksums.
Fields§
§pkalg: [u8; 2]Public key algorithm (must be “Ed”).
kdfalg: [u8; 2]KDF algorithm (must be “BK”).
kdfrounds: u32Number of KDF rounds.
salt: [u8; 16]Salt for KDF.
checksum: [u8; 8]Checksum of the decrypted key.
keynum: [u8; 8]Key ID (KeyNum).
seckey: Zeroizing<[u8; 64]>Encrypted secret key data.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EncKey
impl RefUnwindSafe for EncKey
impl Send for EncKey
impl Sync for EncKey
impl Unpin for EncKey
impl UnwindSafe for EncKey
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