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
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).