Table of Contents

Class Key

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

Base class for asymmetric cipher algorithms.

public abstract class Key

Inheritance

Key

Derived

Inherited Members

Properties

Comment

Gets or sets the key comment.

public string Comment { get; set; }

Property Value

string

DigitalSignature

Gets the default digital signature implementation for this key.

protected abstract DigitalSignature DigitalSignature { get; }

Property Value

DigitalSignature

KeyLength

Gets the length of the key in bits.

public abstract int KeyLength { get; }

Property Value

int

Public

Gets the public key.

public abstract BigInteger[] Public { get; }

Property Value

BigInteger[]

Methods

Sign(byte[])

Signs the specified data with the key.

public byte[] Sign(byte[] data)

Parameters

data byte[]

The data to sign.

Returns

byte[]

Signed data.

VerifySignature(byte[], byte[])

Verifies the signature.

public bool VerifySignature(byte[] data, byte[] signature)

Parameters

data byte[]

The data to verify.

signature byte[]

The signature to verify against.

Returns

bool

true is signature was successfully verifies; otherwise false.