KeyLifeCycle

Trait KeyLifeCycle 

Source
pub trait KeyLifeCycle: KeyStore {
    // Required methods
    fn deprecate_key(&mut self, id: &KeyId) -> Result<()>;
    fn revoke_key(&mut self, id: &KeyId) -> Result<()>;
    fn cleanup_old_versions(
        &mut self,
        id: &KeyId,
        keep_versions: usize,
    ) -> Result<Vec<KeyId>>;
}
Expand description

Extended trait for advanced key lifecycle management

Provides methods for managing key states and cleanup policies This exxtends KeyStore with operations for key deprecation and revocation

Required Methods§

Source

fn deprecate_key(&mut self, id: &KeyId) -> Result<()>

Mark a particular key as deprecated (key should be able to decrypt but not encrypt)

Source

fn revoke_key(&mut self, id: &KeyId) -> Result<()>

Revoke a key (key should not be used for any operations)

Source

fn cleanup_old_versions( &mut self, id: &KeyId, keep_versions: usize, ) -> Result<Vec<KeyId>>

Clean up old versions based on policy

Implementors§