pub struct KeyRing { /* private fields */ }Expand description
One active key for sealing plus any number of retired keys kept only for opening. This is what makes the master key rotatable: run with both, rewrap the store, then drop the old key.
Implementations§
Trait Implementations§
Source§impl Aead for KeyRing
impl Aead for KeyRing
fn seal(&self, plaintext: &[u8]) -> Result<Vec<u8>, CryptoError>
fn open(&self, blob: &[u8]) -> Result<Vec<u8>, CryptoError>
Source§fn is_current(&self, blob: &[u8]) -> bool
fn is_current(&self, blob: &[u8]) -> bool
Whether this blob is already sealed under the key
seal would use.
Rewrapping asks this so it can skip values that need no work; a
single-key implementation has nothing to rotate to, hence the default.Source§fn active_key_id(&self) -> String
fn active_key_id(&self) -> String
A short, stable label for the key
seal is using, so an operator can
confirm which key a replica actually holds.Auto Trait Implementations§
impl Freeze for KeyRing
impl RefUnwindSafe for KeyRing
impl Send for KeyRing
impl Sync for KeyRing
impl Unpin for KeyRing
impl UnsafeUnpin for KeyRing
impl UnwindSafe for KeyRing
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