pub struct MasterKeyring { /* private fields */ }Expand description
A store’s master key material: every key it holds. This is the value custody
implementations store, unlock, and re-protect — never a cipher. coven builds
the EncryptionService cipher from it internally; custody never touches
cipher machinery.
Implementations§
Source§impl MasterKeyring
impl MasterKeyring
Sourcepub fn generate() -> MasterKeyring
pub fn generate() -> MasterKeyring
One fresh generation-1 key.
Sourcepub fn to_serialized(&self) -> String
pub fn to_serialized(&self) -> String
Serialize to the stored keyring JSON — the same format
EncryptionService::to_keyring_string produces, since every
generation this type holds came from (or feeds) that cipher.
Sourcepub fn from_serialized(s: &str) -> Result<MasterKeyring, EncryptionError>
pub fn from_serialized(s: &str) -> Result<MasterKeyring, EncryptionError>
Parse the stored master-key format Self::to_serialized produces.
Sourcepub fn fingerprint(&self) -> String
pub fn fingerprint(&self) -> String
SHA-256 fingerprint of the seal key (the deterministically selected key this keyring seals new data under), first 8 bytes hex-encoded. Short enough to display in UI, long enough to detect wrong keys.
Trait Implementations§
Source§impl Clone for MasterKeyring
impl Clone for MasterKeyring
Source§fn clone(&self) -> MasterKeyring
fn clone(&self) -> MasterKeyring
Returns a duplicate 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 MasterKeyring
impl Debug for MasterKeyring
Source§impl From<EncryptionService> for MasterKeyring
impl From<EncryptionService> for MasterKeyring
Source§fn from(service: EncryptionService) -> MasterKeyring
fn from(service: EncryptionService) -> MasterKeyring
Converts to this type from the input type.
Source§impl From<MasterKeyring> for EncryptionService
impl From<MasterKeyring> for EncryptionService
Source§fn from(keyring: MasterKeyring) -> EncryptionService
fn from(keyring: MasterKeyring) -> EncryptionService
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MasterKeyring
impl RefUnwindSafe for MasterKeyring
impl Send for MasterKeyring
impl Sync for MasterKeyring
impl Unpin for MasterKeyring
impl UnsafeUnpin for MasterKeyring
impl UnwindSafe for MasterKeyring
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.