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

KeyExchangeDiffieHellmanGroupExchangeSha1

Represents "diffie-hellman-group-exchange-sha1" algorithm implementation.
using Renci.SshNet.Abstractions; using System.Security.Cryptography; namespace Renci.SshNet.Security { internal sealed class KeyExchangeDiffieHellmanGroupExchangeSha1 : KeyExchangeDiffieHellmanGroupExchangeShaBase { public override string Name => "diffie-hellman-group-exchange-sha1"; protected override int HashSize => 160; protected override byte[] Hash(byte[] hashData) { using (SHA1 sHA = CryptoAbstraction.CreateSHA1()) return sHA.ComputeHash(hashData, 0, hashData.Length); } } }