virgil_sdk.storage package

Submodules

virgil_sdk.storage.key_entry module

class virgil_sdk.storage.key_entry.KeyEntry(name, value, meta)[source]

Bases: object

meta

Key meta data.

name

Key alias.

to_json()[source]
value

Key representation.

virgil_sdk.storage.key_storage module

class virgil_sdk.storage.key_storage.KeyStorage[source]

Bases: object

The provides protected storage using the user credentials to encrypt or decrypt keys.

delete(name)[source]

Checks if the given alias exists in this keystore.

Parameters:name – key name in storage
Raises:IOError if cannot find key file in storage folder
load(name)[source]

Loads the key associated with the given alias.

Parameters:name – Key name in storage.
Returns:The requested key.
Raises:IOError – if cannot find key file in storage folder
store(key_entry)[source]

Stores the key and data to the given alias.

Parameters:key_entry – Given key entry for store.
Raises:EnvironmentError – if cannot identify operation system for build user home path.

virgil_sdk.storage.private_key_storage module

class virgil_sdk.storage.private_key_storage.PrivateKeyStorage(key_storage=<virgil_sdk.storage.key_storage.KeyStorage object>, key_exporter=<virgil_crypto.private_key_exporter.PrivateKeyExporter object>)[source]

Bases: object

delete(name)[source]

Checks if the given alias exists in this storage and delete it.

Parameters:name – Key alias in storage.
load(name)[source]

The requested key and meta data, or None if the given alias does not exist or does not identify a key-related entry.

Parameters:name – Key name in storage.
Returns:Tuple of key and additional data loaded from storage.
store(private_key, name, meta=None)[source]

Stores the key to the given alias.

Parameters:
  • private_key – PrivateKey representation.
  • name – Key name in storage.
  • meta – Additional data.

Module contents