CngKey.Create Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Skapar ett CngKey objekt som representerar en ny nyckel.
Överlagringar
| Name | Description |
|---|---|
| Create(CngAlgorithm) |
Skapar ett CngKey objekt som kan användas med den angivna algoritmen. |
| Create(CngAlgorithm, String) |
Skapar ett namngivet CngKey objekt som tillhandahåller den angivna algoritmen. |
| Create(CngAlgorithm, String, CngKeyCreationParameters) |
Skapar ett namngivet CngKey objekt som tillhandahåller den angivna algoritmen med hjälp av de angivna nyckelskapandeparametrarna. |
Create(CngAlgorithm)
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
Skapar ett CngKey objekt som kan användas med den angivna algoritmen.
public:
static System::Security::Cryptography::CngKey ^ Create(System::Security::Cryptography::CngAlgorithm ^ algorithm);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm);
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Create : System.Security.Cryptography.CngAlgorithm -> System.Security.Cryptography.CngKey
static member Create : System.Security.Cryptography.CngAlgorithm -> System.Security.Cryptography.CngKey
Public Shared Function Create (algorithm As CngAlgorithm) As CngKey
Parametrar
- algorithm
- CngAlgorithm
Algoritmen som nyckeln ska användas med.
Returer
En tillfällig nyckel.
- Attribut
Undantag
algorithm är null.
Kryptografi nästa generation (CNG) stöds inte i det här systemet.
Alla andra fel.
Kommentarer
Den här överlagringen skapar en nyckel utan namn, vilket innebär att nyckeln är tillfällig (det vill säga att den inte bevaras). Det skapar också ett standardobjekt CngKeyCreationParameters som anger standardparametrar CngProvider och andra avancerade parametrar för nyckeln.
Gäller för
Create(CngAlgorithm, String)
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
Skapar ett namngivet CngKey objekt som tillhandahåller den angivna algoritmen.
public:
static System::Security::Cryptography::CngKey ^ Create(System::Security::Cryptography::CngAlgorithm ^ algorithm, System::String ^ keyName);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string? keyName);
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string? keyName);
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string keyName);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Create : System.Security.Cryptography.CngAlgorithm * string -> System.Security.Cryptography.CngKey
static member Create : System.Security.Cryptography.CngAlgorithm * string -> System.Security.Cryptography.CngKey
Public Shared Function Create (algorithm As CngAlgorithm, keyName As String) As CngKey
Parametrar
- algorithm
- CngAlgorithm
Algoritmen som nyckeln ska användas med.
- keyName
- String
Nyckelnamnet. Om inget namn anges sparas inte nyckeln.
Returer
En bevarad eller tillfällig nyckel som tillhandahåller den angivna algoritmen.
- Attribut
Undantag
algorithm är null.
Kryptografi nästa generation (CNG) stöds inte i det här systemet.
Alla andra fel.
Kommentarer
Om keyName detta anges skapar den här överlagringen en bevarad nyckel. Om keyName inte anges blir nyckeln tillfällig. Den här överlagringen skapar också ett standardobjekt CngKeyCreationParameters som anger standardparametrar CngProvider och andra avancerade parametrar för nyckeln.
Gäller för
Create(CngAlgorithm, String, CngKeyCreationParameters)
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
- Källa:
- Cng.NotSupported.cs
Skapar ett namngivet CngKey objekt som tillhandahåller den angivna algoritmen med hjälp av de angivna nyckelskapandeparametrarna.
public:
static System::Security::Cryptography::CngKey ^ Create(System::Security::Cryptography::CngAlgorithm ^ algorithm, System::String ^ keyName, System::Security::Cryptography::CngKeyCreationParameters ^ creationParameters);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string? keyName, System.Security.Cryptography.CngKeyCreationParameters? creationParameters);
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string? keyName, System.Security.Cryptography.CngKeyCreationParameters? creationParameters);
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string keyName, System.Security.Cryptography.CngKeyCreationParameters creationParameters);
[System.Security.SecurityCritical]
public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string keyName, System.Security.Cryptography.CngKeyCreationParameters creationParameters);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Create : System.Security.Cryptography.CngAlgorithm * string * System.Security.Cryptography.CngKeyCreationParameters -> System.Security.Cryptography.CngKey
static member Create : System.Security.Cryptography.CngAlgorithm * string * System.Security.Cryptography.CngKeyCreationParameters -> System.Security.Cryptography.CngKey
[<System.Security.SecurityCritical>]
static member Create : System.Security.Cryptography.CngAlgorithm * string * System.Security.Cryptography.CngKeyCreationParameters -> System.Security.Cryptography.CngKey
Public Shared Function Create (algorithm As CngAlgorithm, keyName As String, creationParameters As CngKeyCreationParameters) As CngKey
Parametrar
- algorithm
- CngAlgorithm
Algoritmen som nyckeln ska användas med.
- keyName
- String
Nyckelnamnet. Om inget namn anges sparas inte nyckeln.
- creationParameters
- CngKeyCreationParameters
Ett objekt som anger avancerade parametrar för metoden, inklusive CngProvider.
Returer
En bevarad eller tillfällig nyckel som tillhandahåller den angivna algoritmen.
- Attribut
Undantag
algorithm är null.
Kryptografi nästa generation (CNG) stöds inte i det här systemet.
Alla andra fel.
Kommentarer
Om keyName detta anges skapar den här överlagringen en bevarad nyckel. Om keyName inte anges blir nyckeln tillfällig.