MCPcopy Index your code
hub / github.com/borgbackup/borg / decrypt

Method decrypt

src/borg/crypto/key.py:345–350  ·  view source on GitHub ↗
(self, id, data)

Source from the content-addressed store, hash-verified

343 return self.cipher.encrypt(data, header=self.TYPE_STR, iv=next_iv)
344
345 def decrypt(self, id, data):
346 self.assert_type(data[0], id)
347 try:
348 return self.cipher.decrypt(data)
349 except IntegrityError as e:
350 raise IntegrityError(f"Chunk {bin_to_hex(id)}: Could not decrypt [{str(e)}]")
351
352 def init_from_given_data(self, *, crypt_key, id_key, chunk_seed):
353 assert len(crypt_key) in (32 + 32, 32 + 128)

Callers

nothing calls this directly

Calls 4

IntegrityErrorClass · 0.85
bin_to_hexFunction · 0.85
assert_typeMethod · 0.80
decryptMethod · 0.45

Tested by

no test coverage detected