graphenestorage.masterpassword module

class graphenestorage.masterpassword.MasterPassword(config=None, **kwargs)

Bases: object

The keys are encrypted with a Masterpassword that is stored in the configurationStore. It has a checksum to verify correctness of the password The encrypted private keys in keys are encrypted with a random masterkey/masterpassword that is stored in the configuration encrypted by the user-provided password.

Parameters:config (ConfigStore) – Configuration store to get access to the encrypted master password
changePassword(newpassword)
change_password(newpassword)

Change the password that allows to decrypt the master key

decrypt(wif)

Decrypt the content according to BIP38

Parameters:wif (str) – Encrypted key
encrypt(wif)

Encrypt the content according to BIP38

Parameters:wif (str) – Unencrypted key
has_masterpassword()

Tells us if the config store knows an encrypted masterpassword

lock()

Lock the store so that we can no longer decrypt the content of the store

locked()

Is the store locked. E.g. Is a valid password known that can be used to decrypt the master key?

masterkey

Contains the decrypted master key

unlock(password)

The password is used to encrypt this masterpassword. To decrypt the keys stored in the keys database, one must use BIP38, decrypt the masterpassword from the configuration store with the user password, and use the decrypted masterpassword to decrypt the BIP38 encrypted private keys from the keys storage!

Parameters:password (str) – Password to use for en-/de-cryption
unlocked()

Is the store unlocked so that I can decrypt the content?