Browse Source

Add some notes on updating the password

Oz N Tiram 7 years ago
parent
commit
97f552fb10
2 changed files with 12 additions and 2 deletions
  1. 11 1
      pwman/ui/baseui.py
  2. 1 1
      pwman/util/crypto_engine.py

+ 11 - 1
pwman/ui/baseui.py

@@ -417,7 +417,17 @@ class BaseCommands(HelpUIMixin, AliasesMixin, BaseUtilsMixin):
 
     def do_passwd(self, args):  # pragma: no cover
         """change the master password of the database"""
-        pass
+        """old_enc = CryptoEngine.get()
+        CryptoEngine._instance = None
+        new_enc = CryptoEngine.get()
+
+        TODO: backup tables: NODE, TAG, CRYPTO, LOOKUP
+        TODO: create new tables
+        TODO: Iterate on old entries, create new entries with new crypto
+        TODO: If no errors encountered remove backup tables.
+
+        TODO: expand list nodes to accept table name
+        """
 
     def do_tags(self, args):
         """

+ 1 - 1
pwman/util/crypto_engine.py

@@ -116,7 +116,7 @@ def prepare_data(text, block_size):
     return text.ljust(newdatasize)
 
 
-class CryptoEngine(object):  # pagma: no cover
+class CryptoEngine(object):
     _instance = None
     _callback = None