'è®¡ç®hashïŒè²äŒŒTXçè¿äžªç®æ³äŒç»åžžååïŒææ¶äžäœ¿çš
get_group_list_with_group_code äŒäŸèµæ­€æ°æ®
æåèªhttp://pub.idqqimg.com/smartqq/js/mq.js
:param uin:
:param ptwebqq:
:return:'

@staticmethod
def _hash_digest(uin, ptwebqq):

    N = [0, 0, 0, 0]
    for t in range(len(ptwebqq)):
        N[(t % 4)] ^= ord(ptwebqq[t])
    U = ['EC', 'OK']
    V = [0, 0, 0, 0]
    V[0] = (((int(uin) >> 24) & 255) ^ ord(U[0][0]))
    V[1] = (((int(uin) >> 16) & 255) ^ ord(U[0][1]))
    V[2] = (((int(uin) >> 8) & 255) ^ ord(U[1][0]))
    V[3] = ((int(uin) & 255) ^ ord(U[1][1]))
    U = [0, 0, 0, 0, 0, 0, 0, 0]
    for T in range(8):
        if ((T % 2) == 0):
            U[T] = N[(T >> 1)]
        else:
            U[T] = V[(T >> 1)]
    N = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']
    V = ''
    for T in range(len(U)):
        V += N[((U[T] >> 4) & 15)]
        V += N[(U[T] & 15)]
    return V
