Przeglądaj źródła

Remove those pesky geters and setters,

These methods are just old burden which are not used
oz123 10 lat temu
rodzic
commit
8fdb6be55d
1 zmienionych plików z 14 dodań i 19 usunięć
  1. 14 19
      pwman/util/crypto.py

+ 14 - 19
pwman/util/crypto.py

@@ -228,17 +228,17 @@ class CryptoEngine(object):
         """
         return self._keycrypted
 
-    def set_callback(self, callback):
-        """
-        set the callback function
-        """
-        self._callback = callback
-
-    def get_callback(self):
-        """
-        return call back function
-        """
-        return self._callback
+    #def set_callback(self, callback):
+    #    """
+    #    set the callback function
+    #    """
+    #    self._callback = callback
+
+    #def get_callback(self):
+    #    """
+    #    return call back function
+    #    """
+    #    return self._callback
 
     def changepassword(self):
         """
@@ -382,12 +382,8 @@ password again")
         """
         prepare data before encrypting
         """
-        return obj
-        # plaintext = cPickle.dumps(obj)
-        # plaintext = _TAG + obj
-        # numblocks = (len(plaintext)/blocksize) + 1
-        # newdatasize = blocksize*numblocks
-        # return plaintext.ljust(newdatasize)
+        plaintext = obj
+        return plaintext
 
     def _retrievedata(self, plaintext):
         """
@@ -429,8 +425,7 @@ class DummyCryptoEngine(CryptoEngine):
     def changepassword(self):
         return ''
 
-# TODO: add database that passes here
-class CryptoEngineOld(CryptoEngine): # pragma: no cover
+class CryptoEngineOld(CryptoEngine):
 
     def _getcipher_real(self, key, algo):
         """