virgil_sdk.storage.private_key_exporter module

class virgil_sdk.storage.private_key_exporter.PrivateKeyExporter(crypto, password=None)[source]

Bases: object

PrivateKeyExporter provides a list of methods that lets user to export and import private key. :param password: The password for private key.

export_private_key(private_key)[source]

Exports the PrivateKey into material representation. If PrivateKeyExporter was instantiated with password then it will be used to export private key. :param private_key: The private key.

Returns

Private key in material representation of bytes.

import_private_key(key_data)[source]

Imports the private key from its material representation. If PrivateKeyExporter was instantiated with password then it will be used to import private key. :param key_data: The private key material representation bytes.

Returns

The instance of PrivateKey imported.