Table of Contents

Class KeyHostAlgorithm

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

Implements key support for host algorithm.

public class KeyHostAlgorithm : HostAlgorithm

Inheritance

Inherited Members

Constructors

KeyHostAlgorithm(string, Key)

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

public KeyHostAlgorithm(string name, Key key)

Parameters

name string

The signature format identifier.

key Key

The key used in this host key algorithm.

KeyHostAlgorithm(string, Key, DigitalSignature)

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

public KeyHostAlgorithm(string name, Key key, DigitalSignature digitalSignature)

Parameters

name string

The signature format identifier.

key Key

The key used in this host key algorithm.

digitalSignature DigitalSignature

The signature implementation used in this host key algorithm.

Remarks

The key used by digitalSignature is intended to be equal to key. This is not verified.

Properties

Data

Gets the encoded public key data.

public override byte[] Data { get; }

Property Value

byte[]

DigitalSignature

Gets the signature implementation used in this host key algorithm.

public DigitalSignature DigitalSignature { get; }

Property Value

DigitalSignature

Key

Gets the key used in this host key algorithm.

public Key Key { get; }

Property Value

Key

Methods

Sign(byte[])

Signs and encodes the specified data.

public override byte[] Sign(byte[] data)

Parameters

data byte[]

The data to be signed.

Returns

byte[]

The encoded signature.

VerifySignature(byte[], byte[])

Verifies the signature.

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

Parameters

data byte[]

The data to verify the signature against.

signature byte[]

The encoded signature data.

Returns

bool

true if signature is the result of signing data with the corresponding private key to Renci.SshNet.Security.KeyHostAlgorithm.Key.