Cryptographic algorithms
The following three types of cryptography algorithms are used most often:
Hash functions: Hash functions are also known as one-way encryption, and have no key. A hash function outputs a fixed-length hash value for plaintext inputs, and it's impossible to recover the length or content of the plaintext.
Keyed hash functions: Keyed hashing is used to build message authentication codes (MACs); MACs are intended to prevent brute-force attacks. So, they are intentionally designed to be slow.
Symmetric encryption / Secret key (Encryption algorithms): Encryption algorithms output a ciphertext for some text inputs using a variable key and, we can decrypt the ciphertext using the same key.
Public key algorithms: For public key algorithms, we have two different keys: one for encryption and the other to decrypt. So, we can share the public key that can encrypt the message, but it can only be decrypted using the decrypt key, which is not shared.