You can find the necessary classes for encrypting and decrypting information in your application in the System.Secuirty. Cryptography namespace. In this namespace you can find also all the fundamental classes for creating different types of hashes. If you reference the additional assembly System.Security.dll, you have access to even more advanced security functionality such as an API for modifying Windows ACLs (the System.Security.AccessControl namespace), the DPAPI, and classes for creating key-hashed message authentication codes (HMAC). The next table shows the categories of classes:
Category
Description
Encryption algorithms The namespace includes the most important hashing and encryption algorithms and classes for creating digital signatures.
Helper classes
If you need to create true cryptographic random numbers, you can find helper classes in the System.Security.Cryptography namespace. The helper classes are for interacting with the underlying Windows cryptography system (the CryptoAPI).
X509 certificates
In the namespace System.Security.Cryptography.X509Certificates, you can find all the necessary classes for working with X509 certificates and classes for accessing the Windows certificate store.
XML signature and

encryption
You can find complete support of the XML signature and encryption standards in the System.Security.Cryptography.Xml namespace. The classes in this namespace are used for encrypting and signing XML documents according to the standards published by the W3C.
CMS/PKCS#7
The framework has managed support for creating CMS/PKCS-enveloped messages directly without unmanaged calls. (CMS stands for Cryptographic Message Syntax, and PKCS stands for Public-Key Cryptography Standard.)