Cryptography functionality in .NET is defined in the System.Security.Cryptography namespace and can be categorized into four major categories – symmetric, asymmetric, digital signature, and hashing.
Symmetric cryptography also known as secret-key encryption is used to encrypt and decrypt data using a single secret key. Same secret key is used to encrypt and decrypt data from both parties, the sender and the receiver.
Major symmetric algorithms are AES, DES, RC2, Rijndael, and TripleDES. Each of these algorithms has a corresponding class in .NET framework, derived from the SymmetricAlgorithm class.
The following code snippet generates a key and IV using TripleDES algorithm.