AesCng AesCng AesCng AesCng Class

Definition

Provides a Cryptography Next Generation (CNG) implementation of the Advanced Encryption Standard (AES) algorithm.

public ref class AesCng sealed : System::Security::Cryptography::Aes
public sealed class AesCng : System.Security.Cryptography.Aes
type AesCng = class
    inherit Aes
Public NotInheritable Class AesCng
Inherits Aes
Inheritance

Constructors

AesCng() AesCng() AesCng() AesCng()

Initializes a new instance of the AesCng class with an ephemeral key.

AesCng(String) AesCng(String) AesCng(String) AesCng(String)

Initializes a new instance of the AesCng class with the specified key name, which represents an existing persisted AES key.

AesCng(String, CngProvider) AesCng(String, CngProvider) AesCng(String, CngProvider) AesCng(String, CngProvider)

Initializes a new instance of the AesCng class with the specified key name, which represents an existing persisted AES key, and the specified key storage provider (KSP).

AesCng(String, CngProvider, CngKeyOpenOptions) AesCng(String, CngProvider, CngKeyOpenOptions) AesCng(String, CngProvider, CngKeyOpenOptions) AesCng(String, CngProvider, CngKeyOpenOptions)

Initializes a new instance of the AesCng class with the specified key name, which represents an existing persisted AES key, the specified key storage provider (KSP) and key open options.

Properties

BlockSize BlockSize BlockSize BlockSize

Gets or sets the block size, in bits, of the cryptographic operation.

(Inherited from SymmetricAlgorithm)
FeedbackSize FeedbackSize FeedbackSize FeedbackSize

Gets or sets the feedback size, in bits, of the cryptographic operation.

(Inherited from SymmetricAlgorithm)
IV IV IV IV

Gets or sets the initialization vector (IV) for the symmetric algorithm.

(Inherited from SymmetricAlgorithm)
Key Key Key Key

Gets or sets the key for the AesCng algorithm.

KeySize KeySize KeySize KeySize

Gets or sets the size, in bits, of the secret key used by the AesCng algorithm.

LegalBlockSizes LegalBlockSizes LegalBlockSizes LegalBlockSizes Inherited from Aes
LegalKeySizes LegalKeySizes LegalKeySizes LegalKeySizes Inherited from Aes
Mode Mode Mode Mode

Gets or sets the mode for operation of the symmetric algorithm.

(Inherited from SymmetricAlgorithm)
Padding Padding Padding Padding

Gets or sets the padding mode used in the symmetric algorithm.

(Inherited from SymmetricAlgorithm)

Methods

Clear() Clear() Clear() Clear()

Releases all resources used by the SymmetricAlgorithm class.

(Inherited from SymmetricAlgorithm)
CreateDecryptor() CreateDecryptor() CreateDecryptor() CreateDecryptor()

Creates a symmetric AES decryptor object with the current key and initialization vector (IV).

CreateDecryptor(Byte[], Byte[]) CreateDecryptor(Byte[], Byte[]) CreateDecryptor(Byte[], Byte[]) CreateDecryptor(Byte[], Byte[])

Creates a symmetric AES decryptor object with the specified key and initialization vector (IV).

CreateEncryptor() CreateEncryptor() CreateEncryptor() CreateEncryptor()

Creates a symmetric AES encryptor object using the current key and initialization vector (IV).

CreateEncryptor(Byte[], Byte[]) CreateEncryptor(Byte[], Byte[]) CreateEncryptor(Byte[], Byte[]) CreateEncryptor(Byte[], Byte[])

Creates a symmetric AES encryptor object with the specified key and initialization vector (IV).

Dispose() Dispose() Dispose() Dispose()

Releases all resources used by the current instance of the SymmetricAlgorithm class.

(Inherited from SymmetricAlgorithm)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases the unmanaged resources used by the SymmetricAlgorithm and optionally releases the managed resources.

(Inherited from SymmetricAlgorithm)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GenerateIV() GenerateIV() GenerateIV() GenerateIV()

Generates a random initialization vector (IV) to use for the AES algorithm.

GenerateKey() GenerateKey() GenerateKey() GenerateKey()

Generates a random key to use for the AES algorithm.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
ValidKeySize(Int32) ValidKeySize(Int32) ValidKeySize(Int32) ValidKeySize(Int32)

Determines whether the specified key size is valid for the current algorithm.

(Inherited from SymmetricAlgorithm)

Fields

BlockSizeValue BlockSizeValue BlockSizeValue BlockSizeValue

Represents the block size, in bits, of the cryptographic operation.

(Inherited from SymmetricAlgorithm)
FeedbackSizeValue FeedbackSizeValue FeedbackSizeValue FeedbackSizeValue

Represents the feedback size, in bits, of the cryptographic operation.

(Inherited from SymmetricAlgorithm)
IVValue IVValue IVValue IVValue

Represents the initialization vector (IV) for the symmetric algorithm.

(Inherited from SymmetricAlgorithm)
KeySizeValue KeySizeValue KeySizeValue KeySizeValue

Represents the size, in bits, of the secret key used by the symmetric algorithm.

(Inherited from SymmetricAlgorithm)
KeyValue KeyValue KeyValue KeyValue

Represents the secret key for the symmetric algorithm.

(Inherited from SymmetricAlgorithm)
LegalBlockSizesValue LegalBlockSizesValue LegalBlockSizesValue LegalBlockSizesValue

Specifies the block sizes, in bits, that are supported by the symmetric algorithm.

(Inherited from SymmetricAlgorithm)
LegalKeySizesValue LegalKeySizesValue LegalKeySizesValue LegalKeySizesValue

Specifies the key sizes, in bits, that are supported by the symmetric algorithm.

(Inherited from SymmetricAlgorithm)
ModeValue ModeValue ModeValue ModeValue

Represents the cipher mode used in the symmetric algorithm.

(Inherited from SymmetricAlgorithm)
PaddingValue PaddingValue PaddingValue PaddingValue

Represents the padding mode used in the symmetric algorithm.

(Inherited from SymmetricAlgorithm)

Explicit Interface Implementations

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() Inherited from SymmetricAlgorithm

Applies to