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

Method assert_id

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

Source from the content-addressed store, hash-verified

193 pass
194
195 def assert_id(self, id, data):
196 if id and id != Manifest.MANIFEST_ID:
197 id_computed = self.id_hash(data)
198 if not hmac.compare_digest(id_computed, id):
199 raise IntegrityError("Chunk %s: id verification failed" % bin_to_hex(id))
200
201 def assert_type(self, type_byte, id=None):
202 if type_byte not in self.TYPES_ACCEPTABLE:

Callers 4

parseMethod · 0.45
parseMethod · 0.45
test_assert_idMethod · 0.45

Calls 3

id_hashMethod · 0.95
IntegrityErrorClass · 0.85
bin_to_hexFunction · 0.85

Tested by 2

test_assert_idMethod · 0.36