mirror of
https://github.com/hohn/sarif-cli.git
synced 2025-12-16 17:23:03 +01:00
8 lines
230 B
Python
8 lines
230 B
Python
from hashlib import blake2b
|
|
|
|
# takes a bytes object and outputs an 8 byte hash
|
|
def hash_unique(item_to_hash):
|
|
h = blake2b(digest_size = 8)
|
|
h.update(item_to_hash)
|
|
return abs(int.from_bytes(h.digest(), byteorder='big'))
|