Does compression change the hash value? -


i have large file need compress, need ensure original file has same hash value compressed one. tried on smaller file, hash values different thinking might because of metadata change. how ensure files don't change after compression?

it depends on shash using. if using crc32 it's pretty trivial make hashes same. md5 might possible (i don't know start of art there), sha1 doable in few years. if using sha256, better give up.

snark broken crypto aside, unless hash algorithm knows compression setup or input file crafted provoke hash collision: hash change before , after compression. means standard cryptographic hash change upon compression.

all hash algorithm sees stream of bits without meaning. not know compression schemes, , should not.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -