Package pyhsm :: Module db_cmd :: Class YHSM_Cmd_DB_YubiKey_Store

[frames] | no frames]

# Class YHSM_Cmd_DB_YubiKey_Store

    cmd.YHSM_Cmd --+
                   |
                  YHSM_Cmd_DB_YubiKey_Store

Ask YubiHSM to store data about a YubiKey in the internal database (not buffer).

The input is an AEAD, perhaps previously created using generate_aead().

If the nonce for the AEAD is not the same as the public_id, specify it with the nonce keyword argument. This requires a YubiHSM >= 1.0.4.

Instance Methods

__init__(self, stick, public_id, key_handle, aead, nonce=None) The base class for all YSM_ commands. |

parse_result(self, data) Return True if the AEAD was stored sucessfully. |

Inherited from `cmd.YHSM_Cmd`: `execute`

Class Variables
| status = `None`
Inherited from `cmd.YHSM_Cmd`: `executed`, `response_status`

Method Details

### __init__(self, stick, public_id, key_handle, aead, nonce=None)
(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)

Return True if the AEAD was stored sucessfully.

Overrides: cmd.YHSM_Cmd.parse_result