pub struct QuantumKeyManager { /* private fields */ }Expand description
Quantum key rotation manager
Handles automatic rotation of quantum-safe keys
Implementations§
Source§impl QuantumKeyManager
impl QuantumKeyManager
Sourcepub fn new(algorithm: QuantumAlgorithm) -> Result<Self>
pub fn new(algorithm: QuantumAlgorithm) -> Result<Self>
Create a new key manager with initial keypair
Sourcepub fn current_keypair(&self) -> &QuantumKeypair
pub fn current_keypair(&self) -> &QuantumKeypair
Get the current signing keypair
Sourcepub fn rotate_if_needed(&mut self) -> Result<bool>
pub fn rotate_if_needed(&mut self) -> Result<bool>
Rotate keys if needed
Returns true if rotation occurred
Sourcepub fn rotate_keys(&mut self) -> Result<()>
pub fn rotate_keys(&mut self) -> Result<()>
Force key rotation
Sourcepub fn verify_any(
&self,
data: &[u8],
signature: &QuantumSignature,
) -> Result<bool>
pub fn verify_any( &self, data: &[u8], signature: &QuantumSignature, ) -> Result<bool>
Verify a signature using current or previous keypair
Allows grace period during key rotation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QuantumKeyManager
impl RefUnwindSafe for QuantumKeyManager
impl Send for QuantumKeyManager
impl Sync for QuantumKeyManager
impl Unpin for QuantumKeyManager
impl UnwindSafe for QuantumKeyManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more