AesCryptoServiceProvider Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Performs symmetric encryption and decryption using the Cryptographic Application Programming Interfaces (CAPI) implementation of the Advanced Encryption Standard (AES) algorithm.

Namespace:  System.Security.Cryptography
Assembly:  System.Security (in System.Security.dll)

'Declaration
Public NotInheritable Class AesCryptoServiceProvider _
	Inherits SymmetricAlgorithm

The AesCryptoServiceProvider type exposes the following members.

  NameDescription
Public methodAesCryptoServiceProvider(CryptoKey)Initializes a new instance of the AesCryptoServiceProvider class with the specified key.
Public methodAesCryptoServiceProvider(Int32)Initializes a new instance of the AesCryptoServiceProvider class with the specified key size.
Public methodAesCryptoServiceProvider(Session, Int32)Initializes a new instance of the AesCryptoServiceProvider class with the specified session context and key size.
Public methodAesCryptoServiceProvider(String, Int32)Initializes a new instance of the AesCryptoServiceProvider class with the specified service provider and key size.
Top

  NameDescription
Public propertyBlockSizeGets or sets the block size, in bits, of the cryptographic operation. (Inherited from SymmetricAlgorithm.)
Public propertyFeedbackSizeGets or sets the feedback size, in bits, of the cryptographic operation. (Inherited from SymmetricAlgorithm.)
Public propertyIsDisposed (Inherited from SessionContainer.)
Public propertyIVGets or sets the initialization vector (IV) for the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public propertyKeyGets or sets the secret key for the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public propertyKeySizeGets or sets the size, in bits, of the secret key used by the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public propertyLegalBlockSizesGets the block sizes, in bits, that are supported by the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public propertyLegalKeySizesGets the key sizes, in bits, that are supported by the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public propertyModeGets or sets the mode for operation of the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public propertyPaddingGets or sets the padding mode used in the symmetric algorithm. (Inherited from SymmetricAlgorithm.)
Public propertySession (Inherited from SessionContainer.)
Top

  NameDescription
Public methodClearReleases all resources used by the SymmetricAlgorithm class. (Inherited from SymmetricAlgorithm.)
Public methodCreateDecryptor()()()()Creates a symmetric decryptor object with the current Key property and initialization vector (IV). (Inherited from SymmetricAlgorithm.)
Public methodCreateDecryptor(CryptoKey, array<Byte>[]()[][])Creates a symmetric AES decryptor object using the specified key and initialization vector (IV). (Overrides SymmetricAlgorithm..::..CreateDecryptor(CryptoKey, array<Byte>[]()[][]).)
Public methodCreateEncryptor()()()()Creates a symmetric encryptor object with the current Key property and initialization vector (IV). (Inherited from SymmetricAlgorithm.)
Public methodCreateEncryptor(CryptoKey, array<Byte>[]()[][])Creates a symmetric AES encryptor object using the specified key and initialization vector (IV). (Overrides SymmetricAlgorithm..::..CreateEncryptor(CryptoKey, array<Byte>[]()[][]).)
Public methodDispose()()()() (Inherited from SessionContainer.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodGenerateIVGenerates a random initialization vector (IV) to use for the algorithm. (Overrides SymmetricAlgorithm..::..GenerateIV()()()().)
Public methodGenerateKeyGenerates a random key to use for the algorithm. (Overrides SymmetricAlgorithm..::..GenerateKey()()()().)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodValidKeySizeDetermines whether the specified key size is valid for the current algorithm. (Inherited from SymmetricAlgorithm.)
Top

  NameDescription
Public fieldStatic memberDefaultKeySizeThe default size, in bits, of the secret key used by the symmetric algorithm.
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: