Skip to content

Instantly share code, notes, and snippets.

@felixklauke
Created June 21, 2018 07:09
Show Gist options
  • Save felixklauke/10bdb5852a2f5382943f4244d11383b5 to your computer and use it in GitHub Desktop.
Save felixklauke/10bdb5852a2f5382943f4244d11383b5 to your computer and use it in GitHub Desktop.
Creating the Hash of a block.
public String getHash() {
return DigestUtils.sha256Hex(timestamp + HASH_DELIMITER + transactions.toString() + HASH_DELIMITER + previousBlockHash + HASH_DELIMITER + proofOfWork);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment