Package pyhsm :: Module buffer_cmd :: Class YHSM_Cmd_Buffer_Load
[frames] | no frames]

Class YHSM_Cmd_Buffer_Load

cmd.YHSM_Cmd --+
               |
              YHSM_Cmd_Buffer_Load

Ask YubiHSM to load some data into it's internal buffer.

Instance Methods
 
__init__(self, stick, data, offset=0)
The base class for all YSM_ commands.
integer
parse_result(self, data)
Parse result of pyhsm.defines.YSM_BUFFER_LOAD command.

Inherited from cmd.YHSM_Cmd: execute

Class Variables
  offest = 0

Inherited from cmd.YHSM_Cmd: executed, response_status

Instance Variables
integer data_len = 0
Number of bytes (to be) loaded
integer offset
Offset in internal buffer where data will be/was loaded
Method Details

__init__(self, stick, data, offset=0)
(Constructor)

 

The base class for all YSM_ commands.

Parameters:
  • stick - Reference to a YubiHSM
  • command - The YSM_xxx command defined in pyhsm.defines.
  • payload - a packed C struct, represented as a Python string
Overrides: cmd.YHSM_Cmd.__init__
(inherited documentation)

parse_result(self, data)

 

Parse result of pyhsm.defines.YSM_BUFFER_LOAD command.

Returns: integer
Number of bytes now in the YubiHSM internal buffer.
Raises:
Overrides: cmd.YHSM_Cmd.parse_result