def fnv1a_64(data):
    """
    Hashes a string using 64bit fnv1a: http://isthe.com/chongo/tech/comp/fnv/
    """
    r = 0xcbf29ce484222325
    mh = 2 ** 64
    for i in data:
        r = r ^ ord(i)
        r = (r * 0x100000001b3) % mh
    return r