Add files via upload
This commit is contained in:
parent
300e00cdb4
commit
5f11153569
6 changed files with 734 additions and 0 deletions
14
py_arkose_generator/murmur.py
Normal file
14
py_arkose_generator/murmur.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
import struct
|
||||
|
||||
import mmh3
|
||||
|
||||
|
||||
def x64hash128(data, seed=0):
|
||||
# Compute the hash using MurmurHash3 x64
|
||||
hash_bytes = mmh3.hash_bytes(data, seed=seed, x64arch=True)
|
||||
|
||||
# Convert the 128-bit hash to an unsigned hex string
|
||||
hash_hex = struct.unpack("<QQ", hash_bytes)
|
||||
hash_hex_str = "{:016x}{:016x}".format(*hash_hex)
|
||||
|
||||
return hash_hex_str
|
Loading…
Add table
Add a link
Reference in a new issue