Skip to content

Instantly share code, notes, and snippets.

@daviseford
Last active February 17, 2018 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daviseford/edcaeefb5dc1deb65871fccc3d01f17d to your computer and use it in GitHub Desktop.
Save daviseford/edcaeefb5dc1deb65871fccc3d01f17d to your computer and use it in GitHub Desktop.
native-javascript-checksum
const checksum = (txt) => txt.split('').reduce((a, s, i) => a + (txt.charCodeAt(i) * (i + 1)), 0x12345678)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment