1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-24 07:01:59 +00:00

remove unused extract_nonce method

This commit is contained in:
Thomas Waldmann 2017-07-26 01:23:45 +02:00
parent e7228fa3a4
commit 63ebfc140b

View file

@ -791,17 +791,6 @@ def save(self, target, passphrase):
super().save(target, passphrase)
self.logically_encrypted = False
def extract_nonce(self, payload):
# This is called during set-up of the AES ciphers we're not actually using for this
# key. Therefore the return value of this method doesn't matter; it's just around
# to not have it crash should key identification be run against a very small chunk
# by "borg check" when the manifest is lost. (The manifest is always large enough
# to have the original method read some garbage from bytes 33-41). (Also, the return
# value must be larger than the 41 byte bloat of the original format).
if payload[0] != self.TYPE:
raise IntegrityError('Manifest: Invalid encryption envelope')
return 42
def init_ciphers(self, manifest_data=None):
if manifest_data is not None and manifest_data[0] != self.TYPE:
raise IntegrityError('Manifest: Invalid encryption envelope')