(self, id, data)
| 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) |
nothing calls this directly
no test coverage detected