pub struct WorkspaceKeyManager { /* private fields */ }Will be extracted to mockforge-workspace crate
Expand description
Workspace key manager for handling per-workspace encryption keys
Manages individual encryption keys for each workspace, encrypted with the master key. Supports key generation, storage, retrieval, and backup/restore operations.
Implementationsยง
Sourceยงimpl WorkspaceKeyManager
impl WorkspaceKeyManager
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 workspace key manager
Sourcepub fn with_storage_path<P: AsRef<Path>>(path: P) -> Self
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn with_storage_path<P: AsRef<Path>>(path: P) -> Self
Will be extracted to mockforge-workspace crate
Create a workspace key manager with custom key storage path
Sourcepub fn generate_workspace_key(&self, workspace_id: &str) -> Result<String>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn generate_workspace_key(&self, workspace_id: &str) -> Result<String>
Will be extracted to mockforge-workspace crate
Generate a new workspace key and encrypt it with the master key
Sourcepub fn get_workspace_key(&self, workspace_id: &str) -> Result<EncryptionKey>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn get_workspace_key(&self, workspace_id: &str) -> Result<EncryptionKey>
Will be extracted to mockforge-workspace crate
Get the decrypted workspace key for a given workspace
Sourcepub fn has_workspace_key(&self, workspace_id: &str) -> bool
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn has_workspace_key(&self, workspace_id: &str) -> bool
Will be extracted to mockforge-workspace crate
Check if workspace key exists
Sourcepub fn generate_workspace_key_backup(
&self,
workspace_id: &str,
) -> Result<String>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn generate_workspace_key_backup( &self, workspace_id: &str, ) -> Result<String>
Will be extracted to mockforge-workspace crate
Generate a backup string for the workspace key (for sharing between devices)
Trait Implementationsยง
Auto Trait Implementationsยง
impl !Freeze for WorkspaceKeyManager
impl !RefUnwindSafe for WorkspaceKeyManager
impl Send for WorkspaceKeyManager
impl !Sync for WorkspaceKeyManager
impl Unpin for WorkspaceKeyManager
impl UnsafeUnpin for WorkspaceKeyManager
impl UnwindSafe for WorkspaceKeyManager
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
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>
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>
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