Skip to content

Instantly share code, notes, and snippets.

@lhartikk
Created February 24, 2017 21:26
Show Gist options
  • Save lhartikk/44b1777af9c508accc0dc45077978edc to your computer and use it in GitHub Desktop.
Save lhartikk/44b1777af9c508accc0dc45077978edc to your computer and use it in GitHub Desktop.
var calculateHash = (index, previousHash, timestamp, data) => {
return CryptoJS.SHA256(index + previousHash + timestamp + data).toString();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment