[][src]Trait yubihsm::connector::Connection

pub trait Connection: Send + Sync {
    fn send_message(
        &self,
        uuid: Uuid,
        msg: Vec<u8>
    ) -> Result<Vec<u8>, ConnectionError>; }

Connections to the HSM

Required methods

fn send_message(
    &self,
    uuid: Uuid,
    msg: Vec<u8>
) -> Result<Vec<u8>, ConnectionError>

Send a command message to the HSM, then read and return the response

Loading content...

Implementors

impl Connection for UsbConnection[src]

fn send_message(
    &self,
    _uuid: Uuid,
    cmd: Vec<u8>
) -> Result<Vec<u8>, ConnectionError>
[src]

Send a command to the YubiHSM and read its response

impl Connection for MockConnection[src]

fn send_message(
    &self,
    _uuid: Uuid,
    body: Vec<u8>
) -> Result<Vec<u8>, ConnectionError>
[src]

Send a message to the MockHsm

Loading content...