How Does a Hash Function Differ from an Encryption Algorithm?
A hash function is a one-way mathematical process that converts data of any size into a fixed-size string of characters (the hash). It is irreversible; you cannot get the original data back from the hash.
An encryption algorithm is a two-way process that scrambles data (plaintext) into an unreadable format (ciphertext) using a key, which can then be reversed (decrypted) back into the original data using the correct key.