Hashing vs encryption
You need to store passwords, or to confirm that a downloaded file is intact, and wonder whether to hash or to encrypt. The answer depends on the property you need. Encryption keeps data confidential and can be reversed with a key. A hash is a one-way fingerprint for verifying a value without recovering it.
Encryption can be reversed, a hash cannot
Encryption turns data into a form that only the holder of a key can read again. Use it when the original must come back: files, messages, traffic in transit. A hash function gives the same fixed-length output for the same input and is not designed to be reversed. Use it to check integrity: if the hash of a file matches the one its publisher gives on a source you trust, the file has not been altered. A digital signature solves another problem again, proving who produced the data.
Why passwords are hashed and not encrypted
A service only has to verify a password, never to read it back. Password storage should therefore normally use a password-hashing function with a unique salt, a random value stored with each password so that identical passwords produce different hashes. With reversible encryption, whoever obtains the key obtains every password.
Before you call hashed or encrypted data secure
Work out who can observe the data at each point: the local network, the provider, an intermediary, the destination. Find where the key is kept and what can be recovered from a stored result. Do not call a system secure because of one indicator. To compute a hash of a piece of text online, you can use the 2ip hash generator. Do not paste real passwords into any online tool.