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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user