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 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<Self, EncryptionError>
pub fn from_serialized(s: &str) -> Result<Self, 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), hex-encoded in full.
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) -> Self
fn from(service: EncryptionService) -> Self
Converts to this type from the input type.
Source§impl From<MasterKeyring> for EncryptionService
impl From<MasterKeyring> for EncryptionService
Source§fn from(keyring: MasterKeyring) -> Self
fn from(keyring: MasterKeyring) -> Self
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