pub struct OldKeyRetention { /* private fields */ }Available on crate feature
crypto only.Expand description
Manages old keys during the transition period after a rekey.
Implementations§
Source§impl OldKeyRetention
impl OldKeyRetention
Sourcepub fn retain(&mut self, initiator_key: SessionKey, responder_key: SessionKey)
pub fn retain(&mut self, initiator_key: SessionKey, responder_key: SessionKey)
Retain the current keys as old keys.
Sourcepub fn old_initiator_key(&self) -> Option<&SessionKey>
pub fn old_initiator_key(&self) -> Option<&SessionKey>
Get the old initiator key if still within retention window.
Sourcepub fn old_responder_key(&self) -> Option<&SessionKey>
pub fn old_responder_key(&self) -> Option<&SessionKey>
Get the old responder key if still within retention window.
Sourcepub fn within_retention_window(&self) -> bool
pub fn within_retention_window(&self) -> bool
Check if we’re within the retention window.
Sourcepub fn should_clear(&self) -> bool
pub fn should_clear(&self) -> bool
Check if old keys should be cleared due to expired retention.
Sourcepub fn clear_if_expired(&mut self)
pub fn clear_if_expired(&mut self)
Clear old keys if retention has expired.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OldKeyRetention
impl RefUnwindSafe for OldKeyRetention
impl Send for OldKeyRetention
impl Sync for OldKeyRetention
impl Unpin for OldKeyRetention
impl UnwindSafe for OldKeyRetention
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