Created
July 8, 2018 17:27
-
-
Save saintbyte/a4254f22ec03a9043da64587f37a29ab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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