Project: One-Way Hash
A one-way hash is a small value that we compute based on a larger amount of data. It is also known as a digest.
One-way hashes are useful in cryptographic contexts because good ones can't be used to deduce the original data from the hash. We could, for example, store the one-way hash values of passwords in a file and use them to confirm that the password entered by a user hashes to the correct value stored in the file. This way we don't expose the actual passwords in the file. They can also be used for digital signatures and checksums.
They are also useful in creating hash tables used to implement maps or dictionaries. The one-way hash computed from a given key will correspond to the index in the array where the corresponding value will be stored in the hash table.
Write a function that implements the [[https://en.wikipedia.org/wiki/MD5|MD5]] hash algorithm. You main program should accept a filename on the command line, read the file in binary mode, compute the MD5 hash and print the MD5 hash in hexadecimal on the console.
See [[https://en.wikipedia.org/wiki/Cryptographic_hash_function|Cryptographic Hash]] See other project