<PackageReference Include="SSH.NET" Version="2024.2.0" />

HashInfo

public class HashInfo
Holds information about key size and cipher to use.
using Renci.SshNet.Common; using System; using System.Security.Cryptography; namespace Renci.SshNet { public class HashInfo { public int KeySize { get; set; } public bool IsEncryptThenMAC { get; set; } public Func<byte[], HashAlgorithm> HashAlgorithm { get; set; } public HashInfo(int keySize, Func<byte[], HashAlgorithm> hash, bool isEncryptThenMAC = false) { KeySize = keySize; HashAlgorithm = ((byte[] key) => hash(key.Take(KeySize / 8))); IsEncryptThenMAC = isEncryptThenMAC; } } }