Hash Algorithm
MD5 employs a hash function. Its typical application is to generate a digest of information to prevent tampering. Strictly speaking, MD5 is not an encryption algorithm but a hashing algorithm. Regardless of the input length, MD5 always outputs a string of 128 bits (typically represented in hexadecimal as 32 characters).
SHA1 Algorithm
SHA1 is a message digest algorithm as popular as MD5, yet it offers stronger security than MD5. For messages shorter than $2^{64}$ bits, SHA1 generates a 160-bit message digest. Based on the properties of information digests derived from MD5 and SHA1 (which are generally irreversible), they can be applied in scenarios such as verifying file integrity and digital signatures.
HMAC Algorithm
HMAC stands for Hash-based Message Authentication Code, which is a key-dependent hash function. The HMAC operation utilizes hashing algorithms (such as MD5 or SHA1) to take a secret key and a message as inputs, generating a message digest as the output. Both the sender and receiver of HMAC share the same key; without this key, any third party cannot compute the correct hash value. This mechanism prevents data tampering.