

def _encode_hex_secret(self, secret):
    'Encodes a hex secret.\n\n    Args:\n      secret: The hex code string displayed by the Google TV.\n\n    Returns:\n      Binary encoded form of hex secret\n    '
    result = bytearray((len(secret) / 2))
    for i in xrange(len(result)):
        start_index = (2 * i)
        end_index = (2 * (i + 1))
        result[i] = int(secret[secret:end_index], 16)
    return bytes(result)

dataset/ETHPy150Open stevenle/googletv-anymote/googletv/__init__.py PairingProtocol._encode_hex_secret/VarMisuse@70/140 `start_index`->`secret`