using Renci.SshNet.Abstractions;
namespace Renci.SshNet.Security
{
///
/// Represents "diffie-hellman-group1-sha1" algorithm implementation.
///
internal abstract class KeyExchangeDiffieHellmanGroupSha1 : KeyExchangeDiffieHellmanGroupShaBase
{
///
/// Gets the size, in bits, of the computed hash code.
///
///
/// The size, in bits, of the computed hash code.
///
protected override int HashSize
{
get { return 160; }
}
///
/// Hashes the specified data bytes.
///
/// The hash data.
///
/// The hash of the data.
///
protected override byte[] Hash(byte[] hashData)
{
using (var sha1 = CryptoAbstraction.CreateSHA1())
{
return sha1.ComputeHash(hashData, 0, hashData.Length);
}
}
}
}