1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 09:47:58 +00:00

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

This commit is contained in:
Thomas Waldmann 2015-03-08 04:20:13 +01:00
commit 084f6e1602

View file

@ -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()