Skip to main content

KeyManagementStore

Struct KeyManagementStore 

Source
pub struct KeyManagementStore { /* private fields */ }
๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Expand description

Key store for managing encryption keys

Implementationsยง

Sourceยง

impl KeyStore

Source

pub fn new() -> Self

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Create a new key store with memory storage

Source

pub fn with_storage(storage: Box<dyn KeyStorage + Send + Sync>) -> Self

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Create a key store with custom storage backend

Source

pub fn initialize_master_key( &mut self, master_password: &str, ) -> EncryptionResult<()>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Initialize the master key for the key store

Source

pub fn generate_key( &mut self, key_id: String, algorithm: EncryptionAlgorithm, purpose: String, ) -> EncryptionResult<()>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Generate a new encryption key

Source

pub fn get_key(&self, key_id: &String) -> EncryptionResult<EncryptionKey>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Retrieve and decrypt a key

Source

pub fn record_key_usage(&mut self, key_id: &String) -> EncryptionResult<()>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Update key usage statistics

Source

pub fn rotate_key(&mut self, key_id: &String) -> EncryptionResult<()>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Rotate a key (generate new version)

Source

pub fn delete_key(&mut self, key_id: &String) -> EncryptionResult<()>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Delete a key

Source

pub fn list_keys(&self) -> Vec<&KeyMetadata>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

List all keys with metadata

Source

pub fn get_key_metadata(&self, key_id: &String) -> Option<&KeyMetadata>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Get key metadata

Source

pub fn key_exists(&self, key_id: &String) -> bool

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Check if a key exists and is active

Source

pub fn set_key_expiration( &mut self, key_id: &String, expires_at: DateTime<Utc>, ) -> EncryptionResult<()>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Set key expiration

Source

pub fn cleanup_expired_keys(&mut self) -> EncryptionResult<Vec<String>>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Clean up expired keys

Source

pub fn get_statistics(&self) -> KeyStoreStatistics

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Get key statistics

Source

pub fn export_metadata(&self) -> EncryptionResult<String>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Export key metadata for backup

Source

pub fn import_metadata(&mut self, metadata_json: &str) -> EncryptionResult<()>

๐Ÿ‘ŽDeprecated:

Will be extracted to mockforge-workspace crate

Import key metadata

Trait Implementationsยง

Sourceยง

impl Debug for KeyStore

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Sourceยง

impl Default for KeyStore

Sourceยง

fn default() -> Self

Returns the โ€œdefault valueโ€ for a type. Read more

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> Fake for T

Sourceยง

fn fake<U>(&self) -> U
where Self: FakeBase<U>,

Sourceยง

fn fake_with_rng<U, R>(&self, rng: &mut R) -> U
where R: Rng + ?Sized, Self: FakeBase<U>,

Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T> Instrument for T

Sourceยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> IntoEither for T

Sourceยง

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 more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Sourceยง

impl<T> Pointable for T

Sourceยง

const ALIGN: usize

The alignment of pointer.
Sourceยง

type Init = T

The type for initializers.
Sourceยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Sourceยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Sourceยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Sourceยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Sourceยง

impl<T> PolicyExt for T
where T: ?Sized,

Sourceยง

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Sourceยง

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Sourceยง

fn vzip(self) -> V

Sourceยง

impl<T> WithSubscriber for T

Sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

impl<T> ParallelSend for T