Created
July 26, 2016 19:04
-
-
Save maraoz/5d0b78707a50195fe6e680945cd511ac to your computer and use it in GitHub Desktop.
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
// Proof of Existence contract, version 1 | |
contract ProofOfExistence { | |
// state | |
bytes32 proof; | |
// constructor | |
function ProofOfExistence() { | |
} | |
// calculate and store the proof for a document | |
function notarize(string document) { | |
proof = calculateProof(document); | |
} | |
// helper function to get a document's sha256 | |
function calculateProof(string document) returns (bytes32) { | |
return sha256(document); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment