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

KeyExchangeDiffieHellmanGroupSha512

Base class for "diffie-hellman" SHA-512 group algorithm implementations.
using Renci.SshNet.Abstractions; using SshNet.Security.Cryptography; using System; using System.Security.Cryptography; namespace Renci.SshNet.Security { internal abstract class KeyExchangeDiffieHellmanGroupSha512 : KeyExchangeDiffieHellmanGroupShaBase { protected override int HashSize => 512; protected override byte[] Hash(byte[] hashData) { SHA512 val = CryptoAbstraction.CreateSHA512(); try { return ((HashAlgorithm)val).ComputeHash(hashData); } finally { ((IDisposable)val)?.Dispose(); } } } }