I was asked to "timestamp" document in a "trusted way". I first begin by RFC 3161 and TSA, then I meet blockchains.
I would like to test my undestranding.
Let's say I deploy the following contract:
pragma solidity ^0.4.0;
contract SimpleTimeStamp {
uint lastHash;
function set(uint x) public {
lastHash = x;
}
}
I will get, in return, a contract addrees.
Then for a doc, "all" I have to do is:
- calculate the sha 256
- convert it to an uint
- call the set function of the contract
- get a transaction hash in return
- store this transaction hash in relation with the doc.
If I want the date I "only" have to use a chain broswer to seek the transaction by his hash and I will get:
- the transaction date
- the unint associated <=> the file sha 256
Am I correct ?