beemstorage.base¶
-
class
beemstorage.base.
InRamConfigurationStore
(*args, **kwargs)¶ Bases:
beemstorage.ram.InRamStore
,beemstorage.interfaces.ConfigInterface
A simple example that stores configuration in RAM.
Internally, this works by simply inheriting
beemstorage.ram.InRamStore
. The interface is defined inbeemstorage.interfaces.ConfigInterface
.
-
class
beemstorage.base.
InRamEncryptedKeyStore
(*args, **kwargs)¶ Bases:
beemstorage.ram.InRamStore
,beemstorage.base.KeyEncryption
An in-RAM Store that stores keys encrypted in RAM.
Internally, this works by simply inheriting
beemstorage.ram.InRamStore
. The interface is defined inbeemstorage.interfaces.KeyInterface
.Note
This module also inherits
beemstorage.masterpassword.MasterPassword
which offers additional methods and deals with encrypting the keys.
-
class
beemstorage.base.
InRamEncryptedTokenStore
(*args, **kwargs)¶ Bases:
beemstorage.ram.InRamStore
,beemstorage.base.TokenEncryption
An in-RAM Store that stores token encrypted in RAM.
Internally, this works by simply inheriting
beemstorage.ram.InRamStore
. The interface is defined inbeemstorage.interfaces.TokenInterface
.Note
This module also inherits
beemstorage.masterpassword.MasterPassword
which offers additional methods and deals with encrypting the keys.
-
class
beemstorage.base.
InRamPlainKeyStore
(*args, **kwargs)¶ Bases:
beemstorage.ram.InRamStore
,beemstorage.interfaces.KeyInterface
A simple in-RAM Store that stores keys unencrypted in RAM
Internally, this works by simply inheriting
beemstorage.ram.InRamStore
. The interface is defined inbeemstorage.interfaces.KeyInterface
.-
add
(wif, pub)¶ - Add a new public/private key pair (correspondence has to be
- checked elsewhere!)
Parameters: - pub (str) – Public key
- wif (str) – Private key
-
delete
(pub)¶ Delete a key from the store
-
getPrivateKeyForPublicKey
(pub)¶ - Returns the (possibly encrypted) private key that
- corresponds to a public key
Parameters: pub (str) – Public key The encryption scheme is BIP38
-
getPublicKeys
()¶ Returns the public keys stored in the database
-
-
class
beemstorage.base.
InRamPlainTokenStore
(*args, **kwargs)¶ Bases:
beemstorage.ram.InRamStore
,beemstorage.interfaces.TokenInterface
A simple in-RAM Store that stores token unencrypted in RAM
Internally, this works by simply inheriting
beemstorage.ram.InRamStore
. The interface is defined inbeemstorage.interfaces.TokenInterface
.-
add
(token, name)¶ - Add a new public/private key pair (correspondence has to be
- checked elsewhere!)
Parameters: - pub (str) – Public key
- wif (str) – Private key
-
delete
(name)¶ Delete a key from the store
-
getPrivateKeyForPublicKey
(pub)¶ - Returns the (possibly encrypted) private key that
- corresponds to a public key
Parameters: pub (str) – Public key The encryption scheme is BIP38
-
getPublicNames
()¶
-
-
class
beemstorage.base.
KeyEncryption
(*args, **kwargs)¶ Bases:
beemstorage.masterpassword.MasterPassword
,beemstorage.interfaces.EncryptedKeyInterface
This is an interface class that provides the methods required for EncryptedKeyInterface and links them to the MasterPassword-provided functionatlity, accordingly.
-
add
(wif, pub)¶ - Add a new public/private key pair (correspondence has to be
- checked elsewhere!)
Parameters: - pub (str) – Public key
- wif (str) – Private key
-
getPrivateKeyForPublicKey
(pub)¶ - Returns the (possibly encrypted) private key that
- corresponds to a public key
Parameters: pub (str) – Public key The encryption scheme is BIP38
-
getPublicKeys
()¶ Returns the public keys stored in the database
-
is_encrypted
()¶ Returns True/False to indicate required use of unlock
-
-
class
beemstorage.base.
SqliteConfigurationStore
(*args, **kwargs)¶ Bases:
beemstorage.sqlite.SQLiteStore
,beemstorage.interfaces.ConfigInterface
This is the configuration storage that stores key/value pairs in the config table of the SQLite3 database.
Internally, this works by simply inheriting
beemstorage.sqlite.SQLiteStore
. The interface is defined inbeemstorage.interfaces.ConfigInterface
.
-
class
beemstorage.base.
SqliteEncryptedKeyStore
(*args, **kwargs)¶ Bases:
beemstorage.sqlite.SQLiteStore
,beemstorage.base.KeyEncryption
This is the key storage that stores the public key and the encrypted private key in the keys table in the SQLite3 database.
Internally, this works by simply inheriting
beemstorage.ram.InRamStore
. The interface is defined inbeemstorage.interfaces.KeyInterface
.Note
This module also inherits
beemstorage.masterpassword.MasterPassword
which offers additional methods and deals with encrypting the keys.
-
class
beemstorage.base.
SqliteEncryptedTokenStore
(*args, **kwargs)¶ Bases:
beemstorage.sqlite.SQLiteStore
,beemstorage.base.TokenEncryption
This is the key storage that stores the account name and the encrypted token in the token table in the SQLite3 database.
Internally, this works by simply inheriting
beemstorage.ram.InRamStore
. The interface is defined inbeemstorage.interfaces.TokenInterface
.Note
This module also inherits
beemstorage.masterpassword.MasterPassword
which offers additional methods and deals with encrypting the token.
-
class
beemstorage.base.
SqlitePlainKeyStore
(*args, **kwargs)¶ Bases:
beemstorage.sqlite.SQLiteStore
,beemstorage.interfaces.KeyInterface
This is the key storage that stores the public key and the unencrypted private key in the keys table in the SQLite3 database.
Internally, this works by simply inheriting
beemstorage.ram.InRamStore
. The interface is defined inbeemstorage.interfaces.KeyInterface
.-
add
(wif, pub)¶ - Add a new public/private key pair (correspondence has to be
- checked elsewhere!)
Parameters: - pub (str) – Public key
- wif (str) – Private key
-
delete
(pub)¶ Delete a key from the store
Parameters: value (str) – Value
-
getPrivateKeyForPublicKey
(pub)¶ - Returns the (possibly encrypted) private key that
- corresponds to a public key
Parameters: pub (str) – Public key The encryption scheme is BIP38
-
getPublicKeys
()¶ Returns the public keys stored in the database
-
is_encrypted
()¶ Returns False, as we are not encrypted here
-
-
class
beemstorage.base.
SqlitePlainTokenStore
(*args, **kwargs)¶ Bases:
beemstorage.sqlite.SQLiteStore
,beemstorage.interfaces.TokenInterface
This is the token storage that stores the public key and the unencrypted private key in the tokens table in the SQLite3 database.
Internally, this works by simply inheriting
beemstorage.ram.InRamStore
. The interface is defined inbeemstorage.interfaces.TokenInterface
.-
add
(token, name)¶ - Add a new public/private key pair (correspondence has to be
- checked elsewhere!)
Parameters: - pub (str) – Public key
- wif (str) – Private key
-
delete
(name)¶ Delete a key from the store
Parameters: value (str) – Value
-
getPrivateKeyForPublicKey
(name)¶ - Returns the (possibly encrypted) private key that
- corresponds to a public key
Parameters: pub (str) – Public key The encryption scheme is BIP38
-
getPublicNames
()¶
-
is_encrypted
()¶ Returns False, as we are not encrypted here
-
updateToken
(name, token)¶
-
-
class
beemstorage.base.
TokenEncryption
(*args, **kwargs)¶ Bases:
beemstorage.masterpassword.MasterPassword
,beemstorage.interfaces.EncryptedTokenInterface
This is an interface class that provides the methods required for EncryptedTokenInterface and links them to the MasterPassword-provided functionatlity, accordingly.
-
add
(token, name)¶ - Add a new public/private key pair (correspondence has to be
- checked elsewhere!)
Parameters: - pub (str) – Public key
- wif (str) – Private key
-
getPrivateKeyForPublicKey
(name)¶ - Returns the (possibly encrypted) private key that
- corresponds to a public key
Parameters: pub (str) – Public key The encryption scheme is BIP38
-
getPublicNames
()¶
-
is_encrypted
()¶ Returns True/False to indicate required use of unlock
-
updateToken
(name, token)¶
-