utilities.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:pogom-linux 作者: PokeHunterProject 项目源码 文件源码
def calcHash(buf):
    global _nhash

    #buf = b"\x61\x24\x7f\xbf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 
    buf = list(bytearray(buf))
    #print buf
    num_bytes = len(buf)
    array_type = ctypes.c_ubyte * num_bytes

    data = _nhash.compute_hash(array_type(*buf), ctypes.c_uint32(num_bytes));

    #print data
    return ctypes.c_uint64(data).value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号