結構簡単に破れるので気休め程度に
Last active
March 10, 2024 00:09
-
-
Save taisan11/03cf10637573841aaaa8c69d23af70ef to your computer and use it in GitHub Desktop.
fasthash(JS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fastHash(input) { | |
let hashValue = 0; | |
for (let i = 0; i < input.length; i++) { | |
hashValue += input.charCodeAt(i); | |
hashValue &= 0xffffffff; | |
} | |
return hashValue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment