(self, *, crypt_key, id_key, chunk_seed)
| 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) |
no outgoing calls
no test coverage detected