ソースを参照

remove unused extract_nonce method

Thomas Waldmann 7 年 前
コミット
63ebfc140b
1 ファイル変更0 行追加11 行削除
  1. 0 11
      src/borg/crypto/key.py

+ 0 - 11
src/borg/crypto/key.py

@@ -791,17 +791,6 @@ class AuthenticatedKeyBase(RepoKey):
         super().save(target, passphrase)
         super().save(target, passphrase)
         self.logically_encrypted = False
         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):
     def init_ciphers(self, manifest_data=None):
         if manifest_data is not None and manifest_data[0] != self.TYPE:
         if manifest_data is not None and manifest_data[0] != self.TYPE:
             raise IntegrityError('Manifest: Invalid encryption envelope')
             raise IntegrityError('Manifest: Invalid encryption envelope')