From 63ebfc140b2831ea5bfaa2d34301f29e6115510b Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 26 Jul 2017 01:23:45 +0200 Subject: [PATCH] remove unused extract_nonce method --- src/borg/crypto/key.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/borg/crypto/key.py b/src/borg/crypto/key.py index 70c8c7bcf..25aae6cf7 100644 --- a/src/borg/crypto/key.py +++ b/src/borg/crypto/key.py @@ -791,17 +791,6 @@ class AuthenticatedKeyBase(RepoKey): 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')