def _encode_hex_secret(self, secret):
    result = bytearray(len(secret) / 2)
    for i in xrange(len(result)):
      start_index = 2 * i
      end_index = 2 * (i + 1)
      result[i] = int(secret[start_index:end_index], 16)
    return bytes(result)
Encodes a hex secret.
dataset/ETHPy150Open stevenle/googletv-anymote/googletv/__init__.py/PairingProtocol._encode_hex_secret