Created
January 31, 2018 16:49
-
-
Save eddieoz/a10e6605eb8d03886eeb1677afbbbc2e to your computer and use it in GitHub Desktop.
Simplified Document Autenticity
This file contains 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 SimplifiedDocAuthenticity { | |
mapping (string => uint) private authenticity; | |
function storeAuthenticity(string docSha256) public { | |
if (checkAuthenticity(docSha256) == 0) { | |
authenticity[docSha256] = now; | |
} | |
} | |
function checkAuthenticity(string docSha256) public constant returns (uint) { | |
return authenticity[docSha256]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment