pub struct Keyring { /* private fields */ }Expand description
The daemon’s identity and the full recipient set: its own public key first, then the break-glass recipients.
Implementations§
Source§impl Keyring
impl Keyring
pub fn new(identity: Identity, break_glass: Vec<Recipient>) -> Keyring
Sourcepub fn public_key(&self) -> String
pub fn public_key(&self) -> String
The daemon’s public key (age1…).
Sourcepub fn recipients(&self) -> &[Recipient]
pub fn recipients(&self) -> &[Recipient]
Everything a value is encrypted to.
pub fn break_glass(&self) -> &[Recipient]
pub fn identity(&self) -> &dyn Identity
Sourcepub fn encrypt(&self, value: &[u8]) -> Result<Vec<u8>>
pub fn encrypt(&self, value: &[u8]) -> Result<Vec<u8>>
Binary age ciphertext to every recipient.
pub fn decrypt(&self, ciphertext: &[u8]) -> Result<Vec<u8>>
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