pub struct InMemoryKeyStore { /* private fields */ }Expand description
In-memory key store for testing and development.
Security Warning: This stores private keys in memory without hardware protection. Use only for testing or development environments.
For production, use Azure Key Vault, Windows Certificate Store, or an HSM.
Implementations§
Source§impl InMemoryKeyStore
impl InMemoryKeyStore
Sourcepub fn add_key_der(
&mut self,
key_path: &str,
der: &[u8],
) -> Result<(), EncryptionError>
pub fn add_key_der( &mut self, key_path: &str, der: &[u8], ) -> Result<(), EncryptionError>
Sourcepub fn remove_key(&mut self, key_path: &str) -> bool
pub fn remove_key(&mut self, key_path: &str) -> bool
Remove a key from the store.
Trait Implementations§
Source§impl Default for InMemoryKeyStore
impl Default for InMemoryKeyStore
Source§impl KeyStoreProvider for InMemoryKeyStore
impl KeyStoreProvider for InMemoryKeyStore
Source§fn provider_name(&self) -> &str
fn provider_name(&self) -> &str
Returns the provider name as used in SQL Server metadata. Read more
Source§fn decrypt_cek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
cmk_path: &'life1 str,
_algorithm: &'life2 str,
encrypted_cek: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, EncryptionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn decrypt_cek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
cmk_path: &'life1 str,
_algorithm: &'life2 str,
encrypted_cek: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, EncryptionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Decrypt a Column Encryption Key (CEK) using the Column Master Key (CMK). Read more
Source§fn sign_data<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_cmk_path: &'life1 str,
_data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, EncryptionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sign_data<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_cmk_path: &'life1 str,
_data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, EncryptionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sign data using the Column Master Key (optional). Read more
Source§fn verify_signature<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_cmk_path: &'life1 str,
_data: &'life2 [u8],
_signature: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<bool, EncryptionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn verify_signature<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_cmk_path: &'life1 str,
_data: &'life2 [u8],
_signature: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<bool, EncryptionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Verify a signature (optional). Read more
Auto Trait Implementations§
impl Freeze for InMemoryKeyStore
impl RefUnwindSafe for InMemoryKeyStore
impl Send for InMemoryKeyStore
impl Sync for InMemoryKeyStore
impl Unpin for InMemoryKeyStore
impl UnsafeUnpin for InMemoryKeyStore
impl UnwindSafe for InMemoryKeyStore
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