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