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

KeyExchangeDiffieHellmanGroupExchangeSha256

Represents "diffie-hellman-group-exchange-sha256" algorithm implementation.
using Renci.SshNet.Abstractions; using System.Security.Cryptography; namespace Renci.SshNet.Security { internal sealed class KeyExchangeDiffieHellmanGroupExchangeSha256 : KeyExchangeDiffieHellmanGroupExchangeShaBase { public override string Name => "diffie-hellman-group-exchange-sha256"; protected override int HashSize => 256; protected override byte[] Hash(byte[] hashData) { using (SHA256 sHA = CryptoAbstraction.CreateSHA256()) return sHA.ComputeHash(hashData); } } }