MLKem.ImportSubjectPublicKeyInfo 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
| ImportSubjectPublicKeyInfo(Byte[]) |
Imports an ML-KEM encapsulation key from an X.509 SubjectPublicKeyInfo structure. |
| ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>) |
Imports an ML-KEM encapsulation key from an X.509 SubjectPublicKeyInfo structure. |
ImportSubjectPublicKeyInfo(Byte[])
- Source:
- MLKem.cs
- Source:
- MLKem.cs
Imports an ML-KEM encapsulation key from an X.509 SubjectPublicKeyInfo structure.
public:
static System::Security::Cryptography::MLKem ^ ImportSubjectPublicKeyInfo(cli::array <System::Byte> ^ source);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLKem ImportSubjectPublicKeyInfo(byte[] source);
public static System.Security.Cryptography.MLKem ImportSubjectPublicKeyInfo(byte[] source);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member ImportSubjectPublicKeyInfo : byte[] -> System.Security.Cryptography.MLKem
static member ImportSubjectPublicKeyInfo : byte[] -> System.Security.Cryptography.MLKem
Public Shared Function ImportSubjectPublicKeyInfo (source As Byte()) As MLKem
Parameters
- source
- Byte[]
The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding.
Returns
The imported key.
- Attributes
Exceptions
source is null
Applies to
ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>)
- Source:
- MLKem.cs
- Source:
- MLKem.cs
Imports an ML-KEM encapsulation key from an X.509 SubjectPublicKeyInfo structure.
public:
static System::Security::Cryptography::MLKem ^ ImportSubjectPublicKeyInfo(ReadOnlySpan<System::Byte> source);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLKem ImportSubjectPublicKeyInfo(ReadOnlySpan<byte> source);
public static System.Security.Cryptography.MLKem ImportSubjectPublicKeyInfo(ReadOnlySpan<byte> source);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member ImportSubjectPublicKeyInfo : ReadOnlySpan<byte> -> System.Security.Cryptography.MLKem
static member ImportSubjectPublicKeyInfo : ReadOnlySpan<byte> -> System.Security.Cryptography.MLKem
Public Shared Function ImportSubjectPublicKeyInfo (source As ReadOnlySpan(Of Byte)) As MLKem
Parameters
- source
- ReadOnlySpan<Byte>
The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding.
Returns
The imported key.
- Attributes
Exceptions
The contents of source do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure.
-or-
The SubjectPublicKeyInfo value does not represent an ML-KEM key.
-or-
The algorithm-specific import failed.
The platform does not support ML-KEM. Callers can use the IsSupported property to determine if the platform supports ML-KEM.