pub struct KeyManager { /* private fields */ }Expand description
Key manager for handling encryption keys
Implementations§
Source§impl KeyManager
impl KeyManager
Sourcepub fn get_database_key(
&mut self,
database_id: DatabaseId,
) -> KVResult<&DatabaseKey>
pub fn get_database_key( &mut self, database_id: DatabaseId, ) -> KVResult<&DatabaseKey>
Sourcepub fn master_key_base64(&self) -> String
pub fn master_key_base64(&self) -> String
Get master key as base64 string (for configuration)
Sourcepub fn rotate_master_key(&mut self) -> KVResult<String>
pub fn rotate_master_key(&mut self) -> KVResult<String>
Rotate master key (generates new key and invalidates all database keys)
§Errors
Returns error if new key generation fails
Auto Trait Implementations§
impl Freeze for KeyManager
impl RefUnwindSafe for KeyManager
impl Send for KeyManager
impl Sync for KeyManager
impl Unpin for KeyManager
impl UnwindSafe for KeyManager
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