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

CipherInfo

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