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

Method init_from_given_data

src/borg/crypto/key.py:352–358  ·  view source on GitHub ↗
(self, *, crypt_key, id_key, chunk_seed)

Source from the content-addressed store, hash-verified

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)
354 assert len(id_key) in (32, 128)
355 assert isinstance(chunk_seed, int)
356 self.crypt_key = crypt_key
357 self.id_key = id_key
358 self.chunk_seed = chunk_seed
359
360 def init_from_random_data(self):
361 data = os.urandom(100)

Callers 2

init_from_random_dataMethod · 0.95
createMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected