is there a way to get a file hash without using the IPFS itself? if yes can this be implemented in thunar/pcmanfm/dophin/etc ?
pic related
is there a way to get a file hash without using the IPFS itself? if yes can this be implemented in thunar/pcmanfm/dophin/etc ?
pic related
ipfs add --only-hash -Q files
Ipfs hashes aren’t only hash, first the file is splited in various chunks called block, and a new block listing all the block is a created (it’s like a .torrent
) and the hash of this is the CID.
More than that but CID are not only a hash, they are a self describing one (the first part describing the encoding method used (base32, base58, …) called multienc, then once decoded a multihash (same but about the hashing alhoritme used)).
thx for the reply, so it can be done it needs to be coded for the app in question, if i understand correctly a IPFS hash guarantees the file integrity like any other hash while also having the “use” mentioned above
If you want to do this in your app you would need : go-cid (encoding identifier) and go-ipld (graph managment).
A hash guarantees the content integrity of the a single block, but IPFS being built this way ensure that the integrity of childs blocks are fine too.
A regular ipfs file points to a special block listing all hashs to follow to reconstruct the file :
Lets say Qmfoo (what you see as your file in ipfs), is likely in reality something like this :
While Qmbar, Qmfaa and Qmfoa are shards of the file, concatenating them together produce the original file (that allows to download Qmbar, Qmfaa and Qmfoa concurrently from different node and check them more easly).
That in a sense a chain of integrity, the integrity of the first block is assured by your hash then the integrity of all of his childs are inherited from his integrity.
PS: That similar to how directories pointing to other directories or files instead of shard.