yubihsm.backends

Submodules

Classes

YhsmBackend

Provides low-level communication with a YubiHSM.

Functions

get_backend([url])

Returns a backend suitable for the given URL.

Package Contents

class yubihsm.backends.YhsmBackend[source]

Bases: abc.ABC

Provides low-level communication with a YubiHSM.

abstractmethod transceive(msg)[source]

Send a verbatim message.

Parameters:

msg (bytes)

Return type:

bytes

abstractmethod close()[source]

Closes the connection to the YubiHSM.

Return type:

None

yubihsm.backends.get_backend(url=None)[source]

Returns a backend suitable for the given URL.

Parameters:

url (Optional[str])

Return type:

YhsmBackend