pub struct MockHsmBackend { /* private fields */ }Expand description
Mock HSM backend (in-process, for development/testing).
Trait Implementations§
Source§impl Default for MockHsmBackend
impl Default for MockHsmBackend
Source§fn default() -> MockHsmBackend
fn default() -> MockHsmBackend
Returns the “default value” for a type. Read more
Source§impl HsmBackend for MockHsmBackend
impl HsmBackend for MockHsmBackend
Source§fn seal(&self, share: &[u8], label: &str) -> Result<SealedShare, HsmError>
fn seal(&self, share: &[u8], label: &str) -> Result<SealedShare, HsmError>
Seal (encrypt) a share inside the HSM.
Source§fn unseal(&self, sealed: &SealedShare) -> Result<Vec<u8>, HsmError>
fn unseal(&self, sealed: &SealedShare) -> Result<Vec<u8>, HsmError>
Unseal (decrypt) a share from the HSM.
Source§fn generate_key(&self, label: &str) -> Result<String, HsmError>
fn generate_key(&self, label: &str) -> Result<String, HsmError>
Generate a new key inside the HSM. Returns the handle.
Auto Trait Implementations§
impl !Freeze for MockHsmBackend
impl RefUnwindSafe for MockHsmBackend
impl Send for MockHsmBackend
impl Sync for MockHsmBackend
impl Unpin for MockHsmBackend
impl UnsafeUnpin for MockHsmBackend
impl UnwindSafe for MockHsmBackend
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