pub struct KeyManager { /* private fields */ }Expand description
Key manager for secure key storage and management
Implementations§
Source§impl KeyManager
impl KeyManager
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates the manager with fresh generator, storage, and rotator components.
Sourcepub fn initialize(&mut self) -> Result<(), CryptographicError>
pub fn initialize(&mut self) -> Result<(), CryptographicError>
Initializes key storage (zones) and rotator; CryptographicError propagates.
Sourcepub fn generate_key_pair(
&mut self,
key_id: String,
_key_type: KeyType,
algorithm: KeyAlgorithm,
security_level: SecurityLevel,
) -> Result<(Key, Key), CryptographicError>
pub fn generate_key_pair( &mut self, key_id: String, _key_type: KeyType, algorithm: KeyAlgorithm, security_level: SecurityLevel, ) -> Result<(Key, Key), CryptographicError>
Generates a private key via the key generator then derives the public key from it — real delegated generation, not a canned pair.
Sourcepub fn store_key(&mut self, key: Key) -> Result<(), CryptographicError>
pub fn store_key(&mut self, key: Key) -> Result<(), CryptographicError>
Stores key in the zone/catalog map.
Sourcepub fn get_key(&self, key_id: &str) -> Result<Key, CryptographicError>
pub fn get_key(&self, key_id: &str) -> Result<Key, CryptographicError>
Cloned Key for key_id or an error.
Sourcepub fn rotate_key(&mut self, old_key: &Key) -> Result<Key, CryptographicError>
pub fn rotate_key(&mut self, old_key: &Key) -> Result<Key, CryptographicError>
Delegates rotation to KeyRotator (new key derived from old_key).
Sourcepub fn get_key_metadata(&self, key_id: &str) -> Option<KeyMetadata>
pub fn get_key_metadata(&self, key_id: &str) -> Option<KeyMetadata>
KeyMetadata for key_id, or None.
Source§impl KeyManager
impl KeyManager
Sourcepub fn install_managed_signing_policy(&mut self, policy: AccessPolicy)
pub fn install_managed_signing_policy(&mut self, policy: AccessPolicy)
Local administrative policy installation, not a wire/request operation. The host must authenticate and authorize administration before calling.
Sourcepub fn begin_paired_signing<'a>(
&'a self,
request: PairedSigningRequest<'a>,
control: &'a SigningControl,
clock: &'a dyn Fn() -> u64,
) -> Result<ManagedPairedSigning<'a>, CryptoError>
pub fn begin_paired_signing<'a>( &'a self, request: PairedSigningRequest<'a>, control: &'a SigningControl, clock: &'a dyn Fn() -> u64, ) -> Result<ManagedPairedSigning<'a>, CryptoError>
Admit using trusted host-authenticated context and trusted Unix clock. No policies means denial, including on a freshly initialized manager. A caller must also hold any application execution permit separately. The clock must be side-effect free and must not reenter SigningControl.
Source§impl KeyManager
impl KeyManager
pub fn begin_object_publication<'a>( &'a mut self, request: PublicationRequest<'a>, workspace: &'a mut PublicationWorkspace, control: &'a ManagedOperationControl, clock: &'a dyn Fn() -> u64, ) -> Result<ManagedObjectPublication<'a>, E>
Source§impl KeyManager
impl KeyManager
pub fn begin_recipient_unwrap<'a>( &'a self, request: RecipientUnwrapRequest<'a>, control: &'a ManagedOperationControl, clock: &'a dyn Fn() -> u64, ) -> Result<ManagedRecipientUnwrap<'a>, E>
Auto Trait Implementations§
impl Freeze for KeyManager
impl RefUnwindSafe for KeyManager
impl Send for KeyManager
impl Sync for KeyManager
impl Unpin for KeyManager
impl UnsafeUnpin for KeyManager
impl UnwindSafe for KeyManager
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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