def generate_device_id ( steamid ) : h = hexlify ( sha1_hash ( str ( steamid ) . encode ( 'ascii' ) ) ) . decode ( 'ascii' ) return "android:%s-%s-%s-%s-%s" % ( h [ : 8 ] , h [ 8 : 12 ] , h [ 12 : 16 ] , h [ 16 : 20 ] , h [ 20 : 32 ] )
python generate android deviceid
Generate Android device id
def generate_device_id(steamid):
    """Generate Android device id

    :param steamid: Steam ID
    :type steamid: :class:`.SteamID`, :class:`int`
    :return: android device id
    :rtype: str
    """
    h = hexlify(sha1_hash(str(steamid).encode('ascii'))).decode('ascii')
    return "android:%s-%s-%s-%s-%s" % (h[:8], h[8:12], h[12:16], h[16:20], h[20:32])