def _on_symbolic_sha3_callback(self, state, data, known_hashes):
assert issymbolic(data), '<STR_LIT>'<EOL>with self.locked_context('<STR_LIT>') as context:<EOL><INDENT>known_sha3 = context.get('<STR_LIT>', None)<EOL>if known_sha3 is None:<EOL><INDENT>known_sha3 = set()<EOL><DEDENT>sha3_states = context.get('<STR_LIT>', [])<EOL>results = []<EOL>known_hashes_cond = False<EOL>for key, value in known_sha3:<EOL><INDENT>assert not issymbolic(key), "<STR_LIT>"<EOL>cond = key == data<EOL>if not state.can_be_true(cond):<EOL><INDENT>continue<EOL><DEDENT>results.append((key, value))<EOL>known_hashes_cond = Operators.OR(cond, known_hashes_cond)<EOL><DEDENT>if not results:<EOL><INDENT>data_concrete = state.solve_one(data)<EOL>s = sha3.keccak_256(data_concrete)<EOL>data_hash = int(s.hexdigest(), <NUM_LIT:16>)<EOL>results.append((data_concrete, data_hash))<EOL>known_hashes_cond = data_concrete == data<EOL>known_sha3.add((data_concrete, data_hash))<EOL><DEDENT>not_known_hashes_cond = Operators.NOT(known_hashes_cond)<EOL>with state as temp_state:<EOL><INDENT>if temp_state.can_be_true(not_known_hashes_cond):<EOL><INDENT>temp_state.constrain(not_known_hashes_cond)<EOL>state_id = self._executor._workspace.save_state(temp_state)<EOL>sha3_states[state_id] = [hsh for buf, hsh in known_sha3]<EOL><DEDENT><DEDENT>context['<STR_LIT>'] = sha3_states<EOL>if not state.can_be_true(known_hashes_cond):<EOL><INDENT>raise TerminateState("<STR_LIT>")<EOL><DEDENT>state.constrain(known_hashes_cond)<EOL>known_hashes.update(results)<EOL><DEDENT>
INTERNAL USE