pub struct Keyring { /* private fields */ }Expand description
One node identity’s KEM keys. It is safe to share between links. Showing it gives the current key id, never a key.
Implementations§
Source§impl Keyring
impl Keyring
Sourcepub fn new(profile: Profile, now: Clock) -> Result<Keyring, SealError>
pub fn new(profile: Profile, now: Clock) -> Result<Keyring, SealError>
A keyring of profile with a fresh current key, reading the time
from now.
Sourcepub fn system(profile: Profile) -> Result<Keyring, SealError>
pub fn system(profile: Profile) -> Result<Keyring, SealError>
A keyring of profile on the system clock.
Sourcepub fn current(&self) -> Arc<PrivateKey> ⓘ
pub fn current(&self) -> Arc<PrivateKey> ⓘ
The key an advertisement names now, rotated first when it has lived
KEY_LIFETIME_MS. Every advertisement reads it when it is signed,
so a renewal names a rotated key.
Sourcepub fn current_id(&self) -> [u8; 8]
pub fn current_id(&self) -> [u8; 8]
The id of the current key, which a sealed_refused names.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Keyring
impl !RefUnwindSafe for Keyring
impl !UnwindSafe for Keyring
impl Send for Keyring
impl Sync for Keyring
impl Unpin for Keyring
impl UnsafeUnpin 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