ECDiffieHellmanCng.ImportPkcs8PrivateKey Method

Definition

Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object.

C#
public override void ImportPkcs8PrivateKey(ReadOnlySpan<byte> source, out int bytesRead);

Parameters

source
ReadOnlySpan<Byte>

The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding.

bytesRead
Int32

When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized.

Applies to

Product Versions
.NET 7, 8, 9