pub struct KeyManagementStore { /* private fields */ }Will be extracted to mockforge-workspace crate
Expand description
Key store for managing encryption keys
Implementationsยง
Sourceยงimpl KeyStore
impl KeyStore
Sourcepub fn new() -> Self
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn new() -> Self
Will be extracted to mockforge-workspace crate
Create a new key store with memory storage
Sourcepub fn with_storage(storage: Box<dyn KeyStorage + Send + Sync>) -> Self
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn with_storage(storage: Box<dyn KeyStorage + Send + Sync>) -> Self
Will be extracted to mockforge-workspace crate
Create a key store with custom storage backend
Sourcepub fn initialize_master_key(
&mut self,
master_password: &str,
) -> EncryptionResult<()>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn initialize_master_key( &mut self, master_password: &str, ) -> EncryptionResult<()>
Will be extracted to mockforge-workspace crate
Initialize the master key for the key store
Sourcepub fn generate_key(
&mut self,
key_id: String,
algorithm: EncryptionAlgorithm,
purpose: String,
) -> EncryptionResult<()>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn generate_key( &mut self, key_id: String, algorithm: EncryptionAlgorithm, purpose: String, ) -> EncryptionResult<()>
Will be extracted to mockforge-workspace crate
Generate a new encryption key
Sourcepub fn get_key(&self, key_id: &String) -> EncryptionResult<EncryptionKey>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn get_key(&self, key_id: &String) -> EncryptionResult<EncryptionKey>
Will be extracted to mockforge-workspace crate
Retrieve and decrypt a key
Sourcepub fn record_key_usage(&mut self, key_id: &String) -> EncryptionResult<()>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn record_key_usage(&mut self, key_id: &String) -> EncryptionResult<()>
Will be extracted to mockforge-workspace crate
Update key usage statistics
Sourcepub fn rotate_key(&mut self, key_id: &String) -> EncryptionResult<()>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn rotate_key(&mut self, key_id: &String) -> EncryptionResult<()>
Will be extracted to mockforge-workspace crate
Rotate a key (generate new version)
Sourcepub fn delete_key(&mut self, key_id: &String) -> EncryptionResult<()>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn delete_key(&mut self, key_id: &String) -> EncryptionResult<()>
Will be extracted to mockforge-workspace crate
Delete a key
Sourcepub fn list_keys(&self) -> Vec<&KeyMetadata>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn list_keys(&self) -> Vec<&KeyMetadata>
Will be extracted to mockforge-workspace crate
List all keys with metadata
Sourcepub fn get_key_metadata(&self, key_id: &String) -> Option<&KeyMetadata>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn get_key_metadata(&self, key_id: &String) -> Option<&KeyMetadata>
Will be extracted to mockforge-workspace crate
Get key metadata
Sourcepub fn key_exists(&self, key_id: &String) -> bool
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn key_exists(&self, key_id: &String) -> bool
Will be extracted to mockforge-workspace crate
Check if a key exists and is active
Sourcepub fn set_key_expiration(
&mut self,
key_id: &String,
expires_at: DateTime<Utc>,
) -> EncryptionResult<()>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn set_key_expiration( &mut self, key_id: &String, expires_at: DateTime<Utc>, ) -> EncryptionResult<()>
Will be extracted to mockforge-workspace crate
Set key expiration
Sourcepub fn cleanup_expired_keys(&mut self) -> EncryptionResult<Vec<String>>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn cleanup_expired_keys(&mut self) -> EncryptionResult<Vec<String>>
Will be extracted to mockforge-workspace crate
Clean up expired keys
Sourcepub fn get_statistics(&self) -> KeyStoreStatistics
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn get_statistics(&self) -> KeyStoreStatistics
Will be extracted to mockforge-workspace crate
Get key statistics
Sourcepub fn export_metadata(&self) -> EncryptionResult<String>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn export_metadata(&self) -> EncryptionResult<String>
Will be extracted to mockforge-workspace crate
Export key metadata for backup
Sourcepub fn import_metadata(&mut self, metadata_json: &str) -> EncryptionResult<()>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn import_metadata(&mut self, metadata_json: &str) -> EncryptionResult<()>
Will be extracted to mockforge-workspace crate
Import key metadata
Trait Implementationsยง
Auto Trait Implementationsยง
impl Freeze for KeyStore
impl !RefUnwindSafe for KeyStore
impl Send for KeyStore
impl Sync for KeyStore
impl Unpin for KeyStore
impl UnsafeUnpin for KeyStore
impl !UnwindSafe for KeyStore
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
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>
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