pub struct KeyStore { /* private fields */ }๐Deprecated:
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 empty key store
Sourcepub fn store_key(&mut self, id: String, key: EncryptionKey)
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn store_key(&mut self, id: String, key: EncryptionKey)
Will be extracted to mockforge-workspace crate
Store a key with a given identifier
Sourcepub fn get_key(&self, id: &str) -> Option<&EncryptionKey>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn get_key(&self, id: &str) -> Option<&EncryptionKey>
Will be extracted to mockforge-workspace crate
Retrieve a key by identifier
Sourcepub fn remove_key(&mut self, id: &str) -> bool
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn remove_key(&mut self, id: &str) -> bool
Will be extracted to mockforge-workspace crate
Remove a key
Sourcepub fn list_keys(&self) -> Vec<String>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn list_keys(&self) -> Vec<String>
Will be extracted to mockforge-workspace crate
List all key identifiers
Sourcepub fn derive_and_store_key(
&mut self,
id: String,
password: &str,
algorithm: EncryptionAlgorithm,
method: KeyDerivationMethod,
) -> Result<()>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn derive_and_store_key( &mut self, id: String, password: &str, algorithm: EncryptionAlgorithm, method: KeyDerivationMethod, ) -> Result<()>
Will be extracted to mockforge-workspace crate
Derive and store a key from password
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
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