def test_bytes_to_hex(self): self.assertEqual('', bytes_to_hex(b'')) self.assertEqual('000fff', bytes_to_hex(b'\x00\x0f\xff'))
def xor_hex(g: str, h: str): return bytes_to_hex(xor_bytes(hex_to_bytes(g), hex_to_bytes(h)))