CompositeMLDsa.ImportCompositeMLDsaPrivateKey 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
| ImportCompositeMLDsaPrivateKey(CompositeMLDsaAlgorithm, Byte[]) |
Imports a Composite ML-DSA private key. |
| ImportCompositeMLDsaPrivateKey(CompositeMLDsaAlgorithm, ReadOnlySpan<Byte>) |
Imports a Composite ML-DSA private key. |
ImportCompositeMLDsaPrivateKey(CompositeMLDsaAlgorithm, Byte[])
- Source:
- CompositeMLDsa.cs
Imports a Composite ML-DSA private key.
public:
static System::Security::Cryptography::CompositeMLDsa ^ ImportCompositeMLDsaPrivateKey(System::Security::Cryptography::CompositeMLDsaAlgorithm ^ algorithm, cli::array <System::Byte> ^ source);
public static System.Security.Cryptography.CompositeMLDsa ImportCompositeMLDsaPrivateKey(System.Security.Cryptography.CompositeMLDsaAlgorithm algorithm, byte[] source);
static member ImportCompositeMLDsaPrivateKey : System.Security.Cryptography.CompositeMLDsaAlgorithm * byte[] -> System.Security.Cryptography.CompositeMLDsa
Public Shared Function ImportCompositeMLDsaPrivateKey (algorithm As CompositeMLDsaAlgorithm, source As Byte()) As CompositeMLDsa
Parameters
- algorithm
- CompositeMLDsaAlgorithm
The specific Composite ML-DSA algorithm for this key.
- source
- Byte[]
The bytes of the public key.
Returns
The imported key.
Exceptions
algorithm or source is null.
Applies to
ImportCompositeMLDsaPrivateKey(CompositeMLDsaAlgorithm, ReadOnlySpan<Byte>)
- Source:
- CompositeMLDsa.cs
Imports a Composite ML-DSA private key.
public:
static System::Security::Cryptography::CompositeMLDsa ^ ImportCompositeMLDsaPrivateKey(System::Security::Cryptography::CompositeMLDsaAlgorithm ^ algorithm, ReadOnlySpan<System::Byte> source);
public static System.Security.Cryptography.CompositeMLDsa ImportCompositeMLDsaPrivateKey(System.Security.Cryptography.CompositeMLDsaAlgorithm algorithm, ReadOnlySpan<byte> source);
static member ImportCompositeMLDsaPrivateKey : System.Security.Cryptography.CompositeMLDsaAlgorithm * ReadOnlySpan<byte> -> System.Security.Cryptography.CompositeMLDsa
Public Shared Function ImportCompositeMLDsaPrivateKey (algorithm As CompositeMLDsaAlgorithm, source As ReadOnlySpan(Of Byte)) As CompositeMLDsa
Parameters
- algorithm
- CompositeMLDsaAlgorithm
The specific Composite ML-DSA algorithm for this key.
- source
- ReadOnlySpan<Byte>
The bytes of the public key.
Returns
The imported key.
Exceptions
source length is the wrong size for the specified algorithm.
-or-
An error occurred while importing the key.
The platform does not support the specified Composite ML-DSA algorithm. Callers can use IsAlgorithmSupported(CompositeMLDsaAlgorithm) to determine if the algorithm is supported.