pub struct InMemoryKeyManager { /* private fields */ }Expand description
Thread-safe in-memory key manager implementation.
Stores encryption keys in memory using a concurrent hash map.
Implementations§
Trait Implementations§
Source§impl Clone for InMemoryKeyManager
impl Clone for InMemoryKeyManager
Source§fn clone(&self) -> InMemoryKeyManager
fn clone(&self) -> InMemoryKeyManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl KeyManager for InMemoryKeyManager
impl KeyManager for InMemoryKeyManager
Source§fn encrypt(
&self,
key_id: &String,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>>>>
fn encrypt( &self, key_id: &String, data: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>>>>
Encrypts data using AES-GCM-SIV with the specified key.
Source§fn decrypt(
&self,
key_id: &String,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>>>>
fn decrypt( &self, key_id: &String, data: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>>>>
Decrypts AES-GCM-SIV encrypted data using the specified key.
Source§fn create_key(&self) -> Pin<Box<dyn Future<Output = Result<String>>>>
fn create_key(&self) -> Pin<Box<dyn Future<Output = Result<String>>>>
Generates a new random encryption key with unique ID.
Source§fn delete_key(
&self,
key_id: &String,
) -> Pin<Box<dyn Future<Output = Result<()>>>>
fn delete_key( &self, key_id: &String, ) -> Pin<Box<dyn Future<Output = Result<()>>>>
Removes a key from the in-memory store.
Auto Trait Implementations§
impl Freeze for InMemoryKeyManager
impl RefUnwindSafe for InMemoryKeyManager
impl Send for InMemoryKeyManager
impl Sync for InMemoryKeyManager
impl Unpin for InMemoryKeyManager
impl UnwindSafe for InMemoryKeyManager
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreCreates a shared type from an unshared type.