Show / Hide Table of Contents

CreateFromPkcs8 Method

CreateFromPkcs8(ReadOnlyMemory<byte>)

Creates a new instance of ECPrivateKey from a DER-encoded private key.

C#
public static ECPrivateKey CreateFromPkcs8(ReadOnlyMemory<byte> encodedKey)

Parameters

Type Name Description
ReadOnlyMemory<byte> encodedKey

The DER-encoded private key.

Returns

ECPrivateKey

A new instance of ECPrivateKey.

Exceptions

Type Condition
CryptographicException

Thrown if the private key is invalid.

In this article
Back to top Generated by DocFX