#fabric #fabric


@informartin
 

Hi everyone,

I have a question concerning the hashes that are stored when using private collections.

I would like to compare a preimage to the stored hash. However, I wonder how they are computed, as there is only very little information about the specifics in the documentation.

So far, it seems to me like MD5 hashes are used (I wonder why MD5 was chosen these days, but that's a different story). What seems odd to me is that I retrieve different hash sizes for different values. Storing a single string leads to a 64bit hashe while storing a marshalled json leads to a 128bit hash value. I retrieve the hashes using the GetPrivateDataHash() function in Go.

Could anyone please shed some light on how to compute the hash from a given preimage?

Thanks and best regards,
Martin

Join fabric@lists.hyperledger.org to automatically receive all group messages.