Edit

Share via


MLKem.ImportDecapsulationKey Method

Definition

Overloads

ImportDecapsulationKey(MLKemAlgorithm, Byte[])

Imports an ML-KEM key from a decapsulation key.

ImportDecapsulationKey(MLKemAlgorithm, ReadOnlySpan<Byte>)

Imports an ML-KEM key from a decapsulation key.

ImportDecapsulationKey(MLKemAlgorithm, Byte[])

Source:
MLKem.cs
Source:
MLKem.cs

Imports an ML-KEM key from a decapsulation key.

public:
 static System::Security::Cryptography::MLKem ^ ImportDecapsulationKey(System::Security::Cryptography::MLKemAlgorithm ^ algorithm, cli::array <System::Byte> ^ source);
public static System.Security.Cryptography.MLKem ImportDecapsulationKey(System.Security.Cryptography.MLKemAlgorithm algorithm, byte[] source);
static member ImportDecapsulationKey : System.Security.Cryptography.MLKemAlgorithm * byte[] -> System.Security.Cryptography.MLKem
Public Shared Function ImportDecapsulationKey (algorithm As MLKemAlgorithm, source As Byte()) As MLKem

Parameters

algorithm
MLKemAlgorithm

The specific ML-KEM algorithm for this key.

source
Byte[]

The decapsulation key.

Returns

The imported key.

Exceptions

source has a length that is not valid for the ML-KEM algorithm.

algorithm is null.

-or-

source is null.

An error occurred while importing the key.

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

Applies to

ImportDecapsulationKey(MLKemAlgorithm, ReadOnlySpan<Byte>)

Source:
MLKem.cs
Source:
MLKem.cs

Imports an ML-KEM key from a decapsulation key.

public:
 static System::Security::Cryptography::MLKem ^ ImportDecapsulationKey(System::Security::Cryptography::MLKemAlgorithm ^ algorithm, ReadOnlySpan<System::Byte> source);
public static System.Security.Cryptography.MLKem ImportDecapsulationKey(System.Security.Cryptography.MLKemAlgorithm algorithm, ReadOnlySpan<byte> source);
static member ImportDecapsulationKey : System.Security.Cryptography.MLKemAlgorithm * ReadOnlySpan<byte> -> System.Security.Cryptography.MLKem
Public Shared Function ImportDecapsulationKey (algorithm As MLKemAlgorithm, source As ReadOnlySpan(Of Byte)) As MLKem

Parameters

algorithm
MLKemAlgorithm

The specific ML-KEM algorithm for this key.

source
ReadOnlySpan<Byte>

The decapsulation key.

Returns

The imported key.

Exceptions

source has a length that is not valid for the ML-KEM algorithm.

algorithm is null.

An error occurred while importing the key.

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

Applies to