Skip to content

Instantly share code, notes, and snippets.

@mehmetcemyucel
Last active January 2, 2018 08:30
Show Gist options
  • Save mehmetcemyucel/59f63d6e4da701856399adf3cc5a1e7f to your computer and use it in GitHub Desktop.
Save mehmetcemyucel/59f63d6e4da701856399adf3cc5a1e7f to your computer and use it in GitHub Desktop.
private String generateHash(long index, String previousHash, String timestamp,
List<String> transactionList, long nonce) {
return org.apache.commons.codec.digest.DigestUtils
.sha256Hex(index + previousHash + timestamp + transactionList + nonce);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment