Show / Hide Table of Contents

CreateFromValue Method

CreateFromValue(ReadOnlyMemory<byte>, KeyType)

Creates a new instance of ECPrivateKey from the given privateValue and keyType.

C#
public static ECPrivateKey CreateFromValue(ReadOnlyMemory<byte> privateValue, KeyType keyType)

Parameters

Type Name Description
ReadOnlyMemory<byte> privateValue

The raw private key data.

KeyType keyType

The type of key this is.

Returns

ECPrivateKey

A new instance of ECPrivateKey.

Exceptions

Type Condition
ArgumentException

Thrown if the key type is not a valid EC key.

Remarks

The privateValue is taken as the raw private key data (scalar value).

In this article
Back to top Generated by DocFX