pub struct KeystoreHeader {
pub magic: [u8; 6],
pub format_version: u16,
pub scheme_id: u16,
pub kdf: KdfParams,
pub cipher: CipherId,
pub salt: [u8; 16],
pub nonce: [u8; 12],
pub payload_len: u32,
}Expand description
Parsed file header.
Fields§
§magic: [u8; 6]Magic bytes (identifies scheme family).
format_version: u16Format version.
scheme_id: u16Scheme id — must match the KeyScheme::SCHEME_ID of the type parameter.
kdf: KdfParamsKDF parameters used to derive the encryption key.
cipher: CipherIdSymmetric cipher used.
salt: [u8; 16]Random salt for the KDF.
nonce: [u8; 12]Random nonce for AES-GCM.
payload_len: u32Length of the following ciphertext + tag blob, in bytes.
Trait Implementations§
Source§impl Clone for KeystoreHeader
impl Clone for KeystoreHeader
Source§fn clone(&self) -> KeystoreHeader
fn clone(&self) -> KeystoreHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KeystoreHeader
Source§impl Debug for KeystoreHeader
impl Debug for KeystoreHeader
impl Eq for KeystoreHeader
Source§impl PartialEq for KeystoreHeader
impl PartialEq for KeystoreHeader
Source§fn eq(&self, other: &KeystoreHeader) -> bool
fn eq(&self, other: &KeystoreHeader) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for KeystoreHeader
Auto Trait Implementations§
impl Freeze for KeystoreHeader
impl RefUnwindSafe for KeystoreHeader
impl Send for KeystoreHeader
impl Sync for KeystoreHeader
impl Unpin for KeystoreHeader
impl UnsafeUnpin for KeystoreHeader
impl UnwindSafe for KeystoreHeader
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