Security
Hashing vs. encryption
Hashing and encryption are both techniques used to secure data, but they serve different purposes:
Hashing
Purpose: Hashing is used for data integrity verification.
Reversibility: It is a one-way function—once data is hashed, it cannot be reversed.
Use cases: Password storage, data integrity checks, digital signatures.
Examples: MD5, SHA-256, SHA-3, bcrypt.
Encryption
Purpose: Encryption is used to protect data confidentiality.
Reversibility: It is a two-way function—encrypted data can be decrypted with the correct key.
Use cases: Secure communication (HTTPS, VPN), data protection, file encryption.
Examples: AES, RSA, DES, Blowfish.
Symetric key
One key to encrypt and decrypt. Used for large amounts of data, and you can assure that the key is available.
Example: AES or DES
Asymetric key
Two keys, called private and public key. A public key is used to encrypt messages. The private key is used to decrypt messages.
The public key is available for others, while the private key needs to be secured and should not be shared among others. Example: RCA
Further information
Link: Hashing vs. encryption