The AesCng class provides a wrapper for the CNG implementation of the AES algorithm. It provides the same interface as the other AES implementations shipped with the .NET Framework, including
AesCng uses the BCrypt layer of CNG to do its work, and requires Windows Vista and the .NET Framework 3.5.
Since most of the AesCng APIs are inherited from the
base class, see the documentation for Aes for a complete API description.
Constructs an AesCng object using the specified algorithm provider. The default settings for this object are:
- Algorithm provider - Microsoft Primitive Algorithm Provider
- Block size - 128 bits
- Feedback size - 8 bits
- Key size - 256 bits
- Cipher mode - CipherMode.CBC
- Padding mode - PaddingMode.PKCS7
||algorithm provider to use for AES computation
Gets or sets the cipher mode to use during encryption or decryption. Supported modes are: