5 lines
186 B
Python
5 lines
186 B
Python
def nxhash(text:str) -> str: # @BenVida StackOverflow
|
|
hash=0
|
|
for ch in text:
|
|
hash = ( hash*281 ^ ord(ch)*997) & 0xFFFFFFFF
|
|
return str(hex(hash)[2:].upper().zfill(8)) |