pub struct MockOpenpgpCardBackend { /* private fields */ }Expand description
In-memory mock backend (no hardware). Testing only.
Implementations§
Trait Implementations§
Source§impl OpenpgpCardBackend for MockOpenpgpCardBackend
impl OpenpgpCardBackend for MockOpenpgpCardBackend
Source§fn generate_keypair(
&mut self,
slot: OpenpgpSlot,
algorithm: &str,
) -> Result<Vec<u8>, CardError>
fn generate_keypair( &mut self, slot: OpenpgpSlot, algorithm: &str, ) -> Result<Vec<u8>, CardError>
Generate a new keypair in the given slot. Returns the public key bytes.
Source§fn import_keypair(
&mut self,
_slot: OpenpgpSlot,
_private_key: &[u8],
) -> Result<(), CardError>
fn import_keypair( &mut self, _slot: OpenpgpSlot, _private_key: &[u8], ) -> Result<(), CardError>
Import a keypair into the given slot (rare; usually generated in-card).
Source§fn public_key(&self, slot: OpenpgpSlot) -> Result<Vec<u8>, CardError>
fn public_key(&self, slot: OpenpgpSlot) -> Result<Vec<u8>, CardError>
Get the public key from a slot.
Auto Trait Implementations§
impl Freeze for MockOpenpgpCardBackend
impl RefUnwindSafe for MockOpenpgpCardBackend
impl Send for MockOpenpgpCardBackend
impl Sync for MockOpenpgpCardBackend
impl Unpin for MockOpenpgpCardBackend
impl UnsafeUnpin for MockOpenpgpCardBackend
impl UnwindSafe for MockOpenpgpCardBackend
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