using System;
using Renci.SshNet.Common;
using Renci.SshNet.Security.Cryptography;
namespace Renci.SshNet
{
///
/// Holds information about key size and cipher to use
///
public class CipherInfo
{
///
/// Gets the size of the key.
///
///
/// The size of the key.
///
public int KeySize { get; private set; }
///
/// Gets the cipher.
///
public Func Cipher { get; private set; }
///
/// Initializes a new instance of the class.
///
/// Size of the key.
/// The cipher.
public CipherInfo(int keySize, Func cipher)
{
KeySize = keySize;
Cipher = (key, iv) => cipher(key.Take(KeySize / 8), iv);
}
}
}