Skip to content

Instantly share code, notes, and snippets.

@saintbyte
Created July 8, 2018 17:27
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 saintbyte/a4254f22ec03a9043da64587f37a29ab to your computer and use it in GitHub Desktop.
Save saintbyte/a4254f22ec03a9043da64587f37a29ab to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.19;
contract Test1 {
bytes32 originalHash;
constructor() public {
originalHash = keccak256(abi.encode(123));
}
function hash(uint originalValue) public view returns (bool) {
bytes32 hashResult = keccak256(abi.encode(originalValue));
if (hashResult == originalHash) return true;
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment