MLKem.ImportPrivateSeed 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
| ImportPrivateSeed(MLKemAlgorithm, Byte[]) |
Imports an ML-KEM key from its private seed value. |
| ImportPrivateSeed(MLKemAlgorithm, ReadOnlySpan<Byte>) |
Imports an ML-KEM key from its private seed value. |
ImportPrivateSeed(MLKemAlgorithm, Byte[])
- Source:
- MLKem.cs
- Source:
- MLKem.cs
Imports an ML-KEM key from its private seed value.
public:
static System::Security::Cryptography::MLKem ^ ImportPrivateSeed(System::Security::Cryptography::MLKemAlgorithm ^ algorithm, cli::array <System::Byte> ^ source);
public static System.Security.Cryptography.MLKem ImportPrivateSeed(System.Security.Cryptography.MLKemAlgorithm algorithm, byte[] source);
static member ImportPrivateSeed : System.Security.Cryptography.MLKemAlgorithm * byte[] -> System.Security.Cryptography.MLKem
Public Shared Function ImportPrivateSeed (algorithm As MLKemAlgorithm, source As Byte()) As MLKem
Parameters
- algorithm
- MLKemAlgorithm
The specific ML-KEM algorithm for this key.
- source
- Byte[]
The private seed.
Returns
The imported key.
Exceptions
source has a length that is not the PrivateSeedSizeInBytes from algorithm.
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
ImportPrivateSeed(MLKemAlgorithm, ReadOnlySpan<Byte>)
- Source:
- MLKem.cs
- Source:
- MLKem.cs
Imports an ML-KEM key from its private seed value.
public:
static System::Security::Cryptography::MLKem ^ ImportPrivateSeed(System::Security::Cryptography::MLKemAlgorithm ^ algorithm, ReadOnlySpan<System::Byte> source);
public static System.Security.Cryptography.MLKem ImportPrivateSeed(System.Security.Cryptography.MLKemAlgorithm algorithm, ReadOnlySpan<byte> source);
static member ImportPrivateSeed : System.Security.Cryptography.MLKemAlgorithm * ReadOnlySpan<byte> -> System.Security.Cryptography.MLKem
Public Shared Function ImportPrivateSeed (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 private seed.
Returns
The imported key.
Exceptions
source has a length that is not the PrivateSeedSizeInBytes from 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.