Edit

Share via


CompositeMLDsa.ImportCompositeMLDsaPrivateKey Method

Definition

Overloads

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.

Applies to