I want to develop a nodejs app in which a user stores a file on IPFS and gives the hash to the app.
What I would like to do is to verify that the contents under this given hash produce the same hash, something similar to verifying the checksum.
Is there a way to do it using the ipfs-api module?
A user writes a “Hello world” string in the “data.txt” file, adds the file on IPFS and gets the hash:
Then he runs my app with the IPFS hash:
node myapp.js QmWpXFXgii2CfYMBXj9jihPcokpFhwCjGQqOipZ1LVGgTU
I would like to verify that the contents under this hash are “Hello world” and he didn’t provide another hash.