diff --git a/attic/key.py b/attic/key.py index 1dbd279a9..fa9df833b 100644 --- a/attic/key.py +++ b/attic/key.py @@ -190,6 +190,12 @@ def detect(cls, repository, manifest_data): 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()