Struct yubihsm::UsbAdapter [−][src]
pub struct UsbAdapter { /* fields omitted */ }
libusb
-based adapter which communicates directly with the YubiHSM2
Methods
impl UsbAdapter
[src]
impl UsbAdapter
Trait Implementations
impl Adapter for UsbAdapter
[src]
impl Adapter for UsbAdapter
type Config = UsbConfig
Configuration options for this adapter
fn open(config: &UsbConfig) -> Result<Self, AdapterError>
[src]
fn open(config: &UsbConfig) -> Result<Self, AdapterError>
Connect to a YubiHSM2 using the given configuration
fn healthcheck(&self) -> Result<(), AdapterError>
[src]
fn healthcheck(&self) -> Result<(), AdapterError>
Check that we still have an active USB connection
fn serial_number(&self) -> Result<SerialNumber, AdapterError>
[src]
fn serial_number(&self) -> Result<SerialNumber, AdapterError>
Get the serial number for the current YubiHSM2 (if available)
fn send_message(
&self,
_uuid: Uuid,
cmd: Vec<u8>
) -> Result<Vec<u8>, AdapterError>
[src]
fn send_message(
&self,
_uuid: Uuid,
cmd: Vec<u8>
) -> Result<Vec<u8>, AdapterError>
Send a command to the YubiHSM and read its response
impl Default for UsbAdapter
[src]
impl Default for UsbAdapter
Auto Trait Implementations
impl Send for UsbAdapter
impl Send for UsbAdapter
impl Sync for UsbAdapter
impl Sync for UsbAdapter