Skip to content

Instantly share code, notes, and snippets.

@eddieoz
Created January 31, 2018 16:49
Show Gist options
  • Save eddieoz/a10e6605eb8d03886eeb1677afbbbc2e to your computer and use it in GitHub Desktop.
Save eddieoz/a10e6605eb8d03886eeb1677afbbbc2e to your computer and use it in GitHub Desktop.
Simplified Document Autenticity
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