pub enum LockboxProtection<'a> {
ContentKey(SecureVec),
Password(&'a SecureString),
ContactPublicKey {
name: Option<String>,
contact: ContactPublicKey,
},
}Expand description
Key material used when creating a new lockbox file.
Password and ContactPublicKey generate a fresh random content key and
store only a wrapped copy of that key in the lockbox key directory.
ContentKey is for callers that already manage the high-entropy secret
used to derive page encryption keys.
Variants§
ContentKey(SecureVec)
Protect the lockbox directly with a caller-provided content key.
The bytes should be a high-entropy application secret. They are not a password and are not stored as a key slot.
Password(&'a SecureString)
Generate a content key and protect it with a password key slot.
ContactPublicKey
Generate a content key and protect it with a contact public key.
This is the public half of a hybrid contact keypair.
Auto Trait Implementations§
impl<'a> Freeze for LockboxProtection<'a>
impl<'a> RefUnwindSafe for LockboxProtection<'a>
impl<'a> Send for LockboxProtection<'a>
impl<'a> Sync for LockboxProtection<'a>
impl<'a> Unpin for LockboxProtection<'a>
impl<'a> UnsafeUnpin for LockboxProtection<'a>
impl<'a> UnwindSafe for LockboxProtection<'a>
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