#[non_exhaustive]pub enum LairEntryInner {
Seed {
tag: Arc<str>,
seed_info: SeedInfo,
seed: Seed,
},
DeepLockedSeed {
tag: Arc<str>,
seed_info: SeedInfo,
salt: BinDataSized<16>,
ops_limit: u32,
mem_limit: u32,
seed: Seed,
},
WkaTlsCert {
tag: Arc<str>,
cert_info: CertInfo,
priv_key: SecretData,
},
}
Expand description
The raw lair entry inner types that can be stored. This is generally
wrapped by an Arc
. See the typedef LairEntry.
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.
Seed
Fields
This seed can be
- derived
- used for ed25519 signatures
- used for x25519 encryption The secretstream seed uses the base passphrase-derived secret for decryption.
DeepLockedSeed
Fields
§
salt: BinDataSized<16>
Salt for argon2id encrypted seed.
As ‘Seed’ but requires an additional access-time passphrase.
WkaTlsCert
Fields
§
priv_key: SecretData
The certificate private key, encrypted with context key.
This tls cert and private key can be used to establish tls cryptography The secretstream priv_key uses the base passphrase-derived secret for decryption.
Implementations§
source§impl LairEntryInner
impl LairEntryInner
sourcepub fn encode(&self) -> LairResult<Box<[u8]>>
pub fn encode(&self) -> LairResult<Box<[u8]>>
Encode this LairEntry as bytes.
sourcepub fn decode(bytes: &[u8]) -> LairResult<LairEntryInner>
pub fn decode(bytes: &[u8]) -> LairResult<LairEntryInner>
Decode a LairEntry from bytes.
Trait Implementations§
source§impl Clone for LairEntryInner
impl Clone for LairEntryInner
source§fn clone(&self) -> LairEntryInner
fn clone(&self) -> LairEntryInner
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LairEntryInner
impl Debug for LairEntryInner
source§impl<'de> Deserialize<'de> for LairEntryInner
impl<'de> Deserialize<'de> for LairEntryInner
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for LairEntryInner
impl Send for LairEntryInner
impl Sync for LairEntryInner
impl Unpin for LairEntryInner
impl UnwindSafe for LairEntryInner
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