Edit

Share via


SlhDsa.ImportFromPem Method

Definition

Overloads

ImportFromPem(String)

Imports an SLH-DSA key from an RFC 7468 PEM-encoded string.

ImportFromPem(ReadOnlySpan<Char>)

Imports an SLH-DSA key from an RFC 7468 PEM-encoded string.

ImportFromPem(String)

Source:
SlhDsa.cs

Imports an SLH-DSA key from an RFC 7468 PEM-encoded string.

public:
 static System::Security::Cryptography::SlhDsa ^ ImportFromPem(System::String ^ source);
public static System.Security.Cryptography.SlhDsa ImportFromPem(string source);
static member ImportFromPem : string -> System.Security.Cryptography.SlhDsa
Public Shared Function ImportFromPem (source As String) As SlhDsa

Parameters

source
String

The text of the PEM key to import.

Returns

The imported SLH-DSA key.

Exceptions

source is null.

Applies to

ImportFromPem(ReadOnlySpan<Char>)

Source:
SlhDsa.cs
Source:
SlhDsa.cs

Imports an SLH-DSA key from an RFC 7468 PEM-encoded string.

public:
 static System::Security::Cryptography::SlhDsa ^ ImportFromPem(ReadOnlySpan<char> source);
public static System.Security.Cryptography.SlhDsa ImportFromPem(ReadOnlySpan<char> source);
static member ImportFromPem : ReadOnlySpan<char> -> System.Security.Cryptography.SlhDsa
Public Shared Function ImportFromPem (source As ReadOnlySpan(Of Char)) As SlhDsa

Parameters

source
ReadOnlySpan<Char>

The text of the PEM key to import.

Returns

The imported SLH-DSA key.

Exceptions

source contains an encrypted PEM-encoded key.

-or-

source contains multiple PEM-encoded SLH-DSA keys.

-or-

source contains no PEM-encoded SLH-DSA keys.

An error occurred while importing the key.

The platform does not support SLH-DSA. Callers can use the IsSupported property to determine if the platform supports SLH-DSA.

Remarks

Unsupported or malformed PEM-encoded objects will be ignored. If multiple supported PEM labels are found, an exception is raised to prevent importing a key when the key is ambiguous.

This method supports the following PEM labels:

  • PUBLIC KEY
  • PRIVATE KEY

Applies to