def call_hash(self, buf):
buf = list(bytearray(buf))
num_bytes = len(buf)
array_type = ctypes.c_ubyte * num_bytes
data = self._hash_lib.compute_hash(array_type(*buf), ctypes.c_uint32(num_bytes))
return ctypes.c_uint64(data).value
评论列表
文章目录