My question is if i can use the IPFS Reference/Hash to ensure file integrity. In other words if i have a file can i use a specific Hashfunction to ensure that the generated Hash of that file is equal to the IPFS Hash of that file and therefore the file didnt change. Or do i need to generate an extra Hash for this purpose (f.e. sha256)?
thanks in advance.
From IPFS docs:
-n, --only-hash bool - Only chunk and hash - do not write to disk.
So what you might want to do is:
ipfs add --only-hash <ipfs-path>
You can read more here.