#if FEATURE_HMAC_SHA384 using System.Security.Cryptography; namespace Renci.SshNet.Security.Cryptography { /// /// Computes a Hash-based Message Authentication Code (HMAC) by using the hash function. /// public class HMACSHA384 : System.Security.Cryptography.HMACSHA384 { private readonly int _hashSize; /// /// Initializes a with the specified key. /// /// The key. public HMACSHA384(byte[] key) : base(key) { _hashSize = base.HashSize; } /// /// Initializes a with the specified key and size of the computed hash code. /// /// The key. /// The size, in bits, of the computed hash code. public HMACSHA384(byte[] key, int hashSize) : base(key) { _hashSize = hashSize; } /// /// Gets the size, in bits, of the computed hash code. /// /// /// The size, in bits, of the computed hash code. /// public override int HashSize { get { return _hashSize; } } /// /// Finalizes the hash computation after the last data is processed by the cryptographic stream object. /// /// /// The computed hash code. /// protected override byte[] HashFinal() { var hash = base.HashFinal(); return hash.Take(HashSize / 8); } } } #endif // FEATURE_HMAC_SHA384