Språk

MLKem.ImportFromPem Metod

Definition

Importerar en ML-KEM nyckel från en RFC 7468 PEM-kodad sträng.

Överlagringar

Name Description
ImportFromPem(String)

Importerar en ML-KEM nyckel från en RFC 7468 PEM-kodad sträng.

ImportFromPem(ReadOnlySpan<Char>)

Importerar en ML-KEM nyckel från en RFC 7468 PEM-kodad sträng.

ImportFromPem(String)

Källa:
MLKem.cs
Källa:
MLKem.cs
Källa:
MLKem.cs

Importerar en ML-KEM nyckel från en RFC 7468 PEM-kodad sträng.

public:
 static System::Security::Cryptography::MLKem ^ ImportFromPem(System::String ^ source);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLKem ImportFromPem(string source);
public static System.Security.Cryptography.MLKem ImportFromPem(string source);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member ImportFromPem : string -> System.Security.Cryptography.MLKem
static member ImportFromPem : string -> System.Security.Cryptography.MLKem
Public Shared Function ImportFromPem (source As String) As MLKem

Parametrar

source
String

Texten i PEM-nyckeln som ska importeras.

Returer

Den importerade ML-KEM nyckeln.

Attribut

Undantag

source är null

Gäller för

ImportFromPem(ReadOnlySpan<Char>)

Källa:
MLKem.cs
Källa:
MLKem.cs
Källa:
MLKem.cs

Importerar en ML-KEM nyckel från en RFC 7468 PEM-kodad sträng.

public:
 static System::Security::Cryptography::MLKem ^ ImportFromPem(ReadOnlySpan<char> source);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLKem ImportFromPem(ReadOnlySpan<char> source);
public static System.Security.Cryptography.MLKem ImportFromPem(ReadOnlySpan<char> source);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member ImportFromPem : ReadOnlySpan<char> -> System.Security.Cryptography.MLKem
static member ImportFromPem : ReadOnlySpan<char> -> System.Security.Cryptography.MLKem
Public Shared Function ImportFromPem (source As ReadOnlySpan(Of Char)) As MLKem

Parametrar

source
ReadOnlySpan<Char>

Texten i PEM-nyckeln som ska importeras.

Returer

Den importerade ML-KEM nyckeln.

Attribut

Undantag

source innehåller en krypterad PEM-kodad nyckel.

-eller-

source innehåller flera PEM-kodade ML-KEM nycklar.

-eller-

source innehåller inga PEM-kodade ML-KEM nycklar.

Ett fel uppstod när nyckeln skulle importeras.

Kommentarer

PEM-kodade objekt som inte stöds eller som inte stöds ignoreras. Om flera PEM-etiketter som stöds hittas utlöses ett undantag för att förhindra att en nyckel importeras när nyckeln är tvetydig.

Den här metoden stöder följande PEM-etiketter:

  • OFFENTLIG NYCKEL
  • PRIVAT NYCKEL

Gäller för