using Renci.SshNet.Abstractions; namespace Renci.SshNet.Security { /// /// Base class for "diffie-hellman" SHA-512 group algorithm implementations. /// internal abstract class KeyExchangeDiffieHellmanGroupSha512 : 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 512; } } /// /// Hashes the specified data bytes. /// /// The hash data. /// /// The hash of the data. /// protected override byte[] Hash(byte[] hashData) { using (var sha512 = CryptoAbstraction.CreateSHA512()) { return sha512.ComputeHash(hashData); } } } }