CompositeMLDsa.ImportFromPem Method
Definition
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.
Overloads
| ImportFromPem(ReadOnlySpan<Char>) |
Imports a Composite ML-DSA key from an RFC 7468 PEM-encoded string. |
| ImportFromPem(String) |
Imports a Composite ML-DSA key from an RFC 7468 PEM-encoded string. |
ImportFromPem(ReadOnlySpan<Char>)
- Source:
- CompositeMLDsa.cs
Imports a Composite ML-DSA key from an RFC 7468 PEM-encoded string.
public:
static System::Security::Cryptography::CompositeMLDsa ^ ImportFromPem(ReadOnlySpan<char> source);
public static System.Security.Cryptography.CompositeMLDsa ImportFromPem(ReadOnlySpan<char> source);
static member ImportFromPem : ReadOnlySpan<char> -> System.Security.Cryptography.CompositeMLDsa
Public Shared Function ImportFromPem (source As ReadOnlySpan(Of Char)) As CompositeMLDsa
Parameters
- source
- ReadOnlySpan<Char>
The text of the PEM key to import.
Returns
The imported Composite ML-DSA key.
Exceptions
source contains an encrypted PEM-encoded key.
-or-
source contains multiple PEM-encoded Composite ML-DSA keys.
-or-
source contains no PEM-encoded Composite ML-DSA keys.
An error occurred while importing the key.
-or-
The specified Composite ML-DSA algorithm is not supported.
The platform does not support Composite ML-DSA. Callers can use the IsSupported property to determine if the platform supports Composite ML-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
ImportFromPem(String)
- Source:
- CompositeMLDsa.cs
Imports a Composite ML-DSA key from an RFC 7468 PEM-encoded string.
public:
static System::Security::Cryptography::CompositeMLDsa ^ ImportFromPem(System::String ^ source);
public static System.Security.Cryptography.CompositeMLDsa ImportFromPem(string source);
static member ImportFromPem : string -> System.Security.Cryptography.CompositeMLDsa
Public Shared Function ImportFromPem (source As String) As CompositeMLDsa
Parameters
- source
- String
The text of the PEM key to import.
Returns
The imported Composite ML-DSA key.
Exceptions
source is null.