Skip to content

Instantly share code, notes, and snippets.

@tvc97
Created January 7, 2020 16:30
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 tvc97/dbd4d83c317d7d09ba8fbd9d697ca941 to your computer and use it in GitHub Desktop.
Save tvc97/dbd4d83c317d7d09ba8fbd9d697ca941 to your computer and use it in GitHub Desktop.
n1 = Math.floor(Math.random() * 1000)
n2 = (n1 + 0xbfac) % 0xffff
n3 = n1 * n2 % 0xffff
n4 = (n1 + n3 + 0xeaba) % 0xffff
[n1, n2, n3, n4].map(t => ('0000' + (t.toString(16))).slice(-4)).join(' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment