1
0

Wallet file encryption:

- a keypair is derived from the wallet password
 - only the public key is retained in memory
 - wallets must opened and closed explicitly with the daemon
This commit is contained in:
ThomasV
2017-02-09 17:08:27 +01:00
parent 7e76e4ac55
commit fcc92c1ebd
13 changed files with 199 additions and 107 deletions

View File

@@ -1577,10 +1577,10 @@ class Simple_Deterministic_Wallet(Deterministic_Wallet, Simple_Wallet):
def check_password(self, password):
self.keystore.check_password(password)
def update_password(self, old_pw, new_pw):
def update_password(self, old_pw, new_pw, encrypt=False):
self.keystore.update_password(old_pw, new_pw)
self.save_keystore()
self.storage.put('use_encryption', (new_pw is not None))
self.storage.set_password(new_pw, encrypt)
self.storage.write()
def save_keystore(self):
@@ -1686,7 +1686,7 @@ class Multisig_Wallet(Deterministic_Wallet, P2SH):
if keystore.can_change_password():
keystore.update_password(old_pw, new_pw)
self.storage.put(name, keystore.dump())
self.storage.put('use_encryption', (new_pw is not None))
self.storage.set_password(new_pw)
def check_password(self, password):
self.keystore.check_password(password)