Skip to content

Instantly share code, notes, and snippets.

@sontuphan
Last active January 2, 2019 03:44
Show Gist options
  • Save sontuphan/b70bafb0e21fcef401a551d7b0120b31 to your computer and use it in GitHub Desktop.
Save sontuphan/b70bafb0e21fcef401a551d7b0120b31 to your computer and use it in GitHub Desktop.
// Hash algorithm is Keccak256
var s = Math.floor((Math.random() * 1000000000) + 1); // s = 830178382
var selection = ‘rock’;
var combination = selection + s; // combination = ‘rock830178382’
var hashOfCombination = keccak256(combination);
// hashOfCombination = 4d49bb261ecb887e152051da601d028e070635d24da07da2828fca8fecedee50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment