Explorar o código

PR #222 - Merge branch 'issue_189' of https://github.com/ThomasWaldmann/attic into merge

Thomas Waldmann %!s(int64=10) %!d(string=hai) anos
pai
achega
084f6e1602
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      attic/key.py

+ 6 - 0
attic/key.py

@@ -190,6 +190,12 @@ class PassphraseKey(AESKeyBase):
             except IntegrityError:
                 passphrase = getpass(prompt)
 
+    def change_passphrase(self):
+        class ImmutablePassphraseError(Error):
+            """The passphrase for this encryption key type can't be changed."""
+
+        raise ImmutablePassphraseError
+
     def init(self, repository, passphrase):
         self.init_from_random_data(pbkdf2_sha256(passphrase.encode('utf-8'), repository.id, self.iterations, 100))
         self.init_ciphers()