CompositeMLDsa.ImportPkcs8PrivateKey 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
| ImportPkcs8PrivateKey(Byte[]) |
Imports a Composite ML-DSA private key from a PKCS#8 PrivateKeyInfo structure. |
| ImportPkcs8PrivateKey(ReadOnlySpan<Byte>) |
Imports a Composite ML-DSA private key from a PKCS#8 PrivateKeyInfo structure. |
ImportPkcs8PrivateKey(Byte[])
- Source:
- CompositeMLDsa.cs
Imports a Composite ML-DSA private key from a PKCS#8 PrivateKeyInfo structure.
public:
static System::Security::Cryptography::CompositeMLDsa ^ ImportPkcs8PrivateKey(cli::array <System::Byte> ^ source);
public static System.Security.Cryptography.CompositeMLDsa ImportPkcs8PrivateKey(byte[] source);
static member ImportPkcs8PrivateKey : byte[] -> System.Security.Cryptography.CompositeMLDsa
Public Shared Function ImportPkcs8PrivateKey (source As Byte()) As CompositeMLDsa
Parameters
- source
- Byte[]
The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding.
Returns
The imported key.
Exceptions
source is null.
Applies to
ImportPkcs8PrivateKey(ReadOnlySpan<Byte>)
- Source:
- CompositeMLDsa.cs
Imports a Composite ML-DSA private key from a PKCS#8 PrivateKeyInfo structure.
public:
static System::Security::Cryptography::CompositeMLDsa ^ ImportPkcs8PrivateKey(ReadOnlySpan<System::Byte> source);
public static System.Security.Cryptography.CompositeMLDsa ImportPkcs8PrivateKey(ReadOnlySpan<byte> source);
static member ImportPkcs8PrivateKey : ReadOnlySpan<byte> -> System.Security.Cryptography.CompositeMLDsa
Public Shared Function ImportPkcs8PrivateKey (source As ReadOnlySpan(Of Byte)) As CompositeMLDsa
Parameters
- source
- ReadOnlySpan<Byte>
The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding.
Returns
The imported key.
Exceptions
The contents of source do not represent an ASN.1-BER-encoded PKCS#8 PrivateKeyInfo structure.
-or-
The PrivateKeyInfo value does not represent a Composite ML-DSA key.
-or-
source contains trailing data after the ASN.1 structure.
-or-
The algorithm-specific import failed.
-or-
The specified Composite ML-DSA algorithm is not supported.
The platform does not support Composite ML-DSA. Callers can use the IsSupported property to determine if the platform supports Composite ML-DSA.