Show / Hide Table of Contents

ECPrivateKey Class

Namespace: Yubico.YubiKey.Cryptography Assembly: Yubico.YubiKey.dll

Represents the parameters for an Elliptic Curve (EC) private key.

C#
public class ECPrivateKey : PrivateKey, IPrivateKey, IKeyBase
Inheritance object PrivateKey ECPrivateKey
ECPrivateKeyParameters
Implements
IPrivateKey
IKeyBase

Remarks

This class encapsulates the parameters specific to EC private keys and contains the necessary private key data.

Constructors

Name Description
ECPrivateKey(ECDsa)

Initializes a new instance of the ECPrivateKey class using a System.Security.Cryptography.ECDsa object.

ECPrivateKey(ECParameters)

Initializes a new instance of the ECPrivateKey class. It is a wrapper for the System.Security.Cryptography.ECParameters class.

Properties

Name Description
KeyDefinition

Gets the key definition associated with this RSA private key.

KeyType

Gets the type of the cryptographic key.

Parameters

Gets the Elliptic Curve parameters associated with this instance.

Methods

Name Description
Clear()

Clears the buffers containing private key data.

CreateFromParameters(ECParameters)
CreateFromPkcs8(ReadOnlyMemory<byte>)

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

CreateFromValue(ReadOnlyMemory<byte>, KeyType)

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

ExportPkcs8PrivateKey()

Exports the current key in the PKCS#8 PrivateKeyInfo format.

Extension Methods

IPrivateKeyExtensions.Cast<T>(IPrivateKey)
KeyExtensions.EncodeAsPiv(IPrivateKey)
In this article
Back to top Generated by DocFX