Table of Contents

Class EcdsaKey

Namespace
Renci.SshNet.Security
Assembly
Renci.SshNet.dll

Contains ECDSA (ecdsa-sha2-nistp{256,384,521}) private and public key.

public class EcdsaKey : Key, IDisposable

Inheritance

Key

Implements

Inherited Members

Constructors

EcdsaKey(SshKeyData)

Initializes a new instance of the Renci.SshNet.Security.EcdsaKey class.

public EcdsaKey(SshKeyData publicKeyData)

Parameters

publicKeyData SshKeyData

The encoded public key data.

EcdsaKey(string, byte[], byte[])

Initializes a new instance of the Renci.SshNet.Security.EcdsaKey class.

public EcdsaKey(string curve, byte[] publickey, byte[] privatekey)

Parameters

curve string

The curve name or oid.

publickey byte[]

Value of publickey.

privatekey byte[]

Value of privatekey.

EcdsaKey(byte[])

Initializes a new instance of the Renci.SshNet.Security.EcdsaKey class.

public EcdsaKey(byte[] data)

Parameters

data byte[]

DER encoded private key data.

Properties

DigitalSignature

Gets the default digital signature implementation for this key.

protected override DigitalSignature DigitalSignature { get; }

Property Value

DigitalSignature

Ecdsa

Gets the System.Security.Cryptography.ECDsa object.

public ECDsa Ecdsa { get; }

Property Value

ECDsa

HashAlgorithm

Gets the HashAlgorithm to use.

public HashAlgorithmName HashAlgorithm { get; }

Property Value

HashAlgorithmName

KeyLength

Gets the length of the key in bits.

public override int KeyLength { get; }

Property Value

int

PrivateKey

Gets the PrivateKey Bytes.

public byte[]? PrivateKey { get; }

Property Value

byte[]?

Public

Gets the ECDSA public key.

public override BigInteger[] Public { get; }

Property Value

BigInteger[]

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

ToString()

Gets the SSH name of the ECDSA Key.

public override string ToString()

Returns

string

The SSH name of the ECDSA Key.