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

HMACSHA512

public class HMACSHA512 : HMACSHA512
Computes a Hash-based Message Authentication Code (HMAC) by using the SHA512 hash function.
using Renci.SshNet.Common; using System.Security.Cryptography; namespace Renci.SshNet.Security.Cryptography { public class HMACSHA512 : System.Security.Cryptography.HMACSHA512 { private readonly int _hashSize; public override int HashSize => _hashSize; public HMACSHA512(byte[] key) : base(key) { _hashSize = base.HashSize; } public HMACSHA512(byte[] key, int hashSize) : base(key) { _hashSize = hashSize; } protected override byte[] HashFinal() { return base.HashFinal().Take(HashSize / 8); } } }