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
A new instance of ECPrivateKey.
Exceptions
Type | Condition |
---|---|
CryptographicException | Thrown if the private key is invalid. |