AesCng Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the AesCng class.
AesCng() |
Initializes a new instance of the AesCng class with an ephemeral key. |
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) |
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) |
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. |
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
Initializes a new instance of the AesCng class with an ephemeral key.
public:
AesCng();
public AesCng ();
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public AesCng ();
Public Sub New ()
- Attributes
Applies to
.NET 9 og aðrar útgáfur
Vara | Útgáfur |
---|---|
.NET | Core 1.0, Core 1.1, 6, 7, 8, 9 |
.NET Framework | 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
Windows Desktop | 3.0, 3.1, 5 |
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
Initializes a new instance of the AesCng class with the specified key name, which represents an existing persisted AES key.
public:
AesCng(System::String ^ keyName);
public AesCng (string keyName);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public AesCng (string keyName);
new System.Security.Cryptography.AesCng : string -> System.Security.Cryptography.AesCng
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.AesCng : string -> System.Security.Cryptography.AesCng
Public Sub New (keyName As String)
Parameters
- keyName
- String
The name of the key.
- Attributes
Exceptions
keyName
is null
.
Cryptography Next Generation (CNG) is not supported on this system.
All other errors.
Remarks
This constructor uses a default CngKeyOpenOptions value of None and MicrosoftSoftwareKeyStorageProvider as the default key storage provider (KSP) to open the key.
See also
Applies to
.NET 9 og aðrar útgáfur
Vara | Útgáfur |
---|---|
.NET | Core 1.0, Core 1.1, 6, 7, 8, 9 |
.NET Framework | 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
Windows Desktop | 3.0, 3.1, 5 |
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
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).
public:
AesCng(System::String ^ keyName, System::Security::Cryptography::CngProvider ^ provider);
public AesCng (string keyName, System.Security.Cryptography.CngProvider provider);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public AesCng (string keyName, System.Security.Cryptography.CngProvider provider);
new System.Security.Cryptography.AesCng : string * System.Security.Cryptography.CngProvider -> System.Security.Cryptography.AesCng
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.AesCng : string * System.Security.Cryptography.CngProvider -> System.Security.Cryptography.AesCng
Public Sub New (keyName As String, provider As CngProvider)
Parameters
- keyName
- String
The name of the key.
- provider
- CngProvider
The KSP that contains the key.
- Attributes
Exceptions
Cryptography Next Generation (CNG) is not supported on this system.
All other errors.
Remarks
A default CngKeyOpenOptions value of None is used to open the key.
See also
Applies to
.NET 9 og aðrar útgáfur
Vara | Útgáfur |
---|---|
.NET | Core 1.0, Core 1.1, 6, 7, 8, 9 |
.NET Framework | 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
Windows Desktop | 3.0, 3.1, 5 |
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
- Source:
- Cng.NotSupported.cs
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.
public:
AesCng(System::String ^ keyName, System::Security::Cryptography::CngProvider ^ provider, System::Security::Cryptography::CngKeyOpenOptions openOptions);
public AesCng (string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions openOptions);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public AesCng (string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions openOptions);
new System.Security.Cryptography.AesCng : string * System.Security.Cryptography.CngProvider * System.Security.Cryptography.CngKeyOpenOptions -> System.Security.Cryptography.AesCng
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.AesCng : string * System.Security.Cryptography.CngProvider * System.Security.Cryptography.CngKeyOpenOptions -> System.Security.Cryptography.AesCng
Public Sub New (keyName As String, provider As CngProvider, openOptions As CngKeyOpenOptions)
Parameters
- keyName
- String
The name of the key.
- provider
- CngProvider
The KSP that contains the key.
- openOptions
- CngKeyOpenOptions
A bitwise combination of the enumeration values that specify options for opening the key, such as where the key is opened from (machine or user storage) and whether to suppress UI prompting.
- Attributes
Exceptions
Cryptography Next Generation (CNG) is not supported on this system.
All other errors.
See also
Applies to
.NET 9 og aðrar útgáfur
Vara | Útgáfur |
---|---|
.NET | Core 1.0, Core 1.1, 6, 7, 8, 9 |
.NET Framework | 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
Windows Desktop | 3.0, 3.1, 5 |
.NET umsögn
.NET er opið verkefni. Veldu tengil til að gefa umsögn: