Package pyhsm :: Module basic_cmd :: Class YHSM_Cmd_Nonce_Get
[frames] | no frames]

Class YHSM_Cmd_Nonce_Get

cmd.YHSM_Cmd --+
               |
              YHSM_Cmd_Nonce_Get

Get nonce value from YubiHSM - causes it to increment by one (or a specified number).

Call with post_increment 0 to just fetch current value.

Instance Methods
 
__init__(self, stick, post_increment)
The base class for all YSM_ commands.
 
parse_result(self, data)
This function is intended to be overridden by sub-classes that implements commands that should not just return the data read from the YubiHSM.

Inherited from cmd.YHSM_Cmd: execute

Class Variables
  status = None
  response = None

Inherited from cmd.YHSM_Cmd: executed, response_status

Method Details

__init__(self, stick, post_increment)
(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)

 

This function is intended to be overridden by sub-classes that implements commands that should not just return the data read from the YubiHSM.

Overrides: cmd.YHSM_Cmd.parse_result
(inherited documentation)