Edit

Share via


SlhDsa.ImportPkcs8PrivateKey Method

Definition

Overloads

ImportPkcs8PrivateKey(Byte[])

Imports an SLH-DSA private key from a PKCS#8 PrivateKeyInfo structure.

ImportPkcs8PrivateKey(ReadOnlySpan<Byte>)

Imports an SLH-DSA private key from a PKCS#8 PrivateKeyInfo structure.

ImportPkcs8PrivateKey(Byte[])

Source:
SlhDsa.cs

Imports an SLH-DSA private key from a PKCS#8 PrivateKeyInfo structure.

public:
 static System::Security::Cryptography::SlhDsa ^ ImportPkcs8PrivateKey(cli::array <System::Byte> ^ source);
public static System.Security.Cryptography.SlhDsa ImportPkcs8PrivateKey(byte[] source);
static member ImportPkcs8PrivateKey : byte[] -> System.Security.Cryptography.SlhDsa
Public Shared Function ImportPkcs8PrivateKey (source As Byte()) As SlhDsa

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:
SlhDsa.cs
Source:
SlhDsa.cs

Imports an SLH-DSA private key from a PKCS#8 PrivateKeyInfo structure.

public:
 static System::Security::Cryptography::SlhDsa ^ ImportPkcs8PrivateKey(ReadOnlySpan<System::Byte> source);
public static System.Security.Cryptography.SlhDsa ImportPkcs8PrivateKey(ReadOnlySpan<byte> source);
static member ImportPkcs8PrivateKey : ReadOnlySpan<byte> -> System.Security.Cryptography.SlhDsa
Public Shared Function ImportPkcs8PrivateKey (source As ReadOnlySpan(Of Byte)) As SlhDsa

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 an SLH-DSA key.

-or-

source contains trailing data after the ASN.1 structure.

-or-

The algorithm-specific import failed.

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

Applies to