Exemplo n.º 1
0
 public override void Write(byte[] buffer, int offset, int count)
 {
     EnsureNotDisposed();
     WriteInternal(buffer, offset, count);
     ChainedStream.Write(buffer, offset, count);
 }
Exemplo n.º 2
0
 /// <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));
 }