Class KeyHostAlgorithm
- Namespace
- Renci.SshNet.Security
- Assembly
- Renci.SshNet.dll
Implements key support for host algorithm.
public class KeyHostAlgorithm : HostAlgorithmInheritance
Derived
Inherited Members
Constructors
KeyHostAlgorithm(string, Key)
Initializes a new instance of the Renci.SshNet.Security.KeyHostAlgorithm class.
public KeyHostAlgorithm(string name, Key key)Parameters
KeyHostAlgorithm(string, Key, DigitalSignature)
Initializes a new instance of the Renci.SshNet.Security.KeyHostAlgorithm class.
public KeyHostAlgorithm(string name, Key key, DigitalSignature digitalSignature)Parameters
namestring-
The signature format identifier.
keyKey-
The key used in this host key algorithm.
digitalSignatureDigitalSignature-
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
Key
Gets the key used in this host key algorithm.
public Key Key { get; }Property Value
Methods
Sign(byte[])
Signs and encodes the specified data.
public override byte[] Sign(byte[] data)Parameters
databyte[]-
The data to be signed.
Returns
- byte[]
-
The encoded signature.
VerifySignature(byte[], byte[])
Verifies the encoded signature.
public override bool VerifySignature(byte[] data, byte[] signature)Parameters
databyte[]-
The data to verify the signature against.
signaturebyte[]-
The encoded signature data, as the signature format identifier followed by the signature blob.
Returns
- bool
-
true if
signatureis the result of signing and encodingdatawith the corresponding private key to Renci.SshNet.Security.KeyHostAlgorithm.Key.
Remarks
See https://datatracker.ietf.org/doc/html/rfc4253#section-6.6.