pub enum KeyCustody {
Keyring,
Passphrase(Passphrase),
InMemory(MasterKeyring),
Custom(Arc<dyn MasterKeyCustody>),
}Expand description
How a store’s master key is protected. The builder accepts this and never
sees a cipher again — coven resolves the selection into a
MasterKeyCustody and builds every cipher from what it supplies.
Variants§
Keyring
The OS keyring — the default, byte-for-byte today’s behavior.
Passphrase(Passphrase)
Argon2id over a memorized passphrase wraps the keyring; the wrapped blob lives in a file in the store directory.
InMemory(MasterKeyring)
Supplied for this session, never persisted by coven.
Custom(Arc<dyn MasterKeyCustody>)
A host-supplied custody implementation.
Implementations§
Source§impl KeyCustody
impl KeyCustody
Sourcepub fn resolve(
self,
store_id: &str,
store_dir: &StoreDir,
) -> Arc<dyn MasterKeyCustody>
pub fn resolve( self, store_id: &str, store_dir: &StoreDir, ) -> Arc<dyn MasterKeyCustody>
Resolve the selected policy into the trait object coven drives the
sync engine through, injecting what each preset needs from the store’s
identity: store_id for KeyCustody::Keyring (the keyring account
name), store_dir for KeyCustody::Passphrase (the wrapped-file
path).
Auto Trait Implementations§
impl Freeze for KeyCustody
impl !RefUnwindSafe for KeyCustody
impl Send for KeyCustody
impl Sync for KeyCustody
impl Unpin for KeyCustody
impl UnsafeUnpin for KeyCustody
impl !UnwindSafe for KeyCustody
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.