Skip to content

Instantly share code, notes, and snippets.

@taisan11
Last active March 10, 2024 00:09
Show Gist options
  • Save taisan11/03cf10637573841aaaa8c69d23af70ef to your computer and use it in GitHub Desktop.
Save taisan11/03cf10637573841aaaa8c69d23af70ef to your computer and use it in GitHub Desktop.
fasthash(JS)
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