/// <summary>
 /// Calculates the hash for a byte array
 /// </summary>
 public byte[] CalculateHash(byte[] data)
 {
     using (var hashAlgorithm = CryptoHashUtility.GetHashAlgorithm(_hashAlgorithm))
     {
         return(hashAlgorithm.ComputeHash(data));
     }
 }
 /// <summary>
 /// Calculates the hash for a given stream
 /// </summary>
 public byte[] CalculateHash(Stream stream)
 {
     using (var hashAlgorithm = CryptoHashUtility.GetHashAlgorithm(_hashAlgorithm))
     {
         return(hashAlgorithm.ComputeHash(stream));
     }
 }