pyhsm.stick_client.YHSM_Stick_Client

Package pyhsm :: Module stick_client :: Class YHSM_Stick_Client |
[frames] | no frames]

# Class YHSM_Stick_Client

The current YHSM is a USB device using serial communication.

This class exposes the basic functions read, write and flush (input).

Instance Methods
__init__(self, device, timeout=1, debug=False) Open YHSM device. |
acquire(self) |
release(self) |
write(self, data, debug_info=None) Write data to YHSM device. |
read(self, num_bytes, debug_info=None) Read a number of bytes from YubiHSM device. |
flush(self) Flush input buffers. |
drain(self) Drain input. |
raw_device(self) Get the socket address. |
set_debug(self, new) Set debug mode (boolean). |
__repr__(self) |
__del__(self) Close device when YHSM instance is destroyed. |

Method Details

### raw_device(self) |
Get the socket address. Only intended for test code/debugging!

### set_debug(self, new) |
Set debug mode (boolean). Returns old setting.