MD5 Hash Generation Tool

What is MD5?

MD5 (Message-Digest Algorithm 5) is a hash function that generates a 128-bit (16-byte) hash value from any data. It is mainly used for checking data integrity.

MD5 always produces the same hash value for the same input. However, for slightly different inputs, it generates a completely different hash value. This is a characteristic called the "avalanche effect".

From a security perspective, MD5 is no longer recommended for cryptographic purposes. This is because it has been proven that collision attacks (generating the same hash value from different inputs) are possible. However, it is still widely used for non-security purposes such as data integrity checks.

For example, the MD5 hash value for the string "Hello, World!" is 65a8e27d8879283831b664bd8b7f0ad4.

How to execute with Linux command

In Linux, you can use the md5sum command to generate an MD5 hash.

Example of generating a hash from text:
echo -n "Hello, World!" | md5sum
Result: 65a8e27d8879283831b664bd8b7f0ad4 -

Example of generating a hash of a file:
md5sum filename
Result: hash_value filename

Example of generating hashes of multiple files at once:
md5sum file1 file2 file3

Example of verifying a hash value:
md5sum -c hash_list_file
*The hash list file should be in the format "hash_value filename".