/// <summary>
 /// Instantiate an AxCrypt HMAC-calculating stream.
 /// </summary>
 /// <param name="hmacCalculator">The hmac calculator to use.</param>
 /// <returns>A stream to write data to calculate HMAC for to.</returns>
 /// <remarks>This factory method is used instead of a constructor in order to use type inference and offer a cleaner syntax for the comsumer.</remarks>
 public static V2HmacStream <Stream> Create(V2HmacCalculator hmacCalculator)
 {
     return(Create <Stream>(hmacCalculator, Stream.Null));
 }
 /// <summary>
 /// Creates a AxCrypt HMAC-SHA-512 calculating stream.
 /// </summary>
 /// <typeparam name="TChained">The type of the chained actual output stream.</typeparam>
 /// <param name="hmacCalculator">The hmac calculator to use.</param>
 /// <param name="chainedStream">The chained stream. Will be disposed when this instance is disposed.</param>
 /// <returns>A stream to write data to calculate HMAC for to.</returns>
 /// <remarks>This factory method is used instead of a constructor in order to use type inference and offer a cleaner syntax for the comsumer.</remarks>
 public static V2HmacStream <TChained> Create <TChained>(V2HmacCalculator hmacCalculator, TChained chainedStream) where TChained : Stream
 {
     return(ChainedStream <TChained> .Create((chained) => new V2HmacStream <TChained>(hmacCalculator, chainedStream), chainedStream));
 }