<PackageReference Include="BouncyCastle.Cryptography" Version="2.3.0" />

Streams

public static class Streams
public static int DefaultBufferSize { get; }

public static void CopyTo(Stream source, Stream destination)

public static void CopyTo(Stream source, Stream destination, int bufferSize)

public static Task CopyToAsync(Stream source, Stream destination)

public static Task CopyToAsync(Stream source, Stream destination, int bufferSize)

public static Task CopyToAsync(Stream source, Stream destination, CancellationToken cancellationToken)

public static Task CopyToAsync(Stream source, Stream destination, int bufferSize, CancellationToken cancellationToken)

public static void Drain(Stream inStr)

public static void PipeAll(Stream inStr, Stream outStr)

Write the full contents of inStr to the destination stream outStr.

public static void PipeAll(Stream inStr, Stream outStr, int bufferSize)

Write the full contents of inStr to the destination stream outStr.

public static long PipeAllLimited(Stream inStr, long limit, Stream outStr)

Pipe all bytes from inStr to outStr, throwing StreamFlowException if greater than limit bytes in inStr.

public static long PipeAllLimited(Stream inStr, long limit, Stream outStr, int bufferSize)

public static byte[] ReadAll(Stream inStr)

public static byte[] ReadAll(MemoryStream inStr)

public static byte[] ReadAllLimited(Stream inStr, int limit)

public static int ReadFully(Stream inStr, byte[] buf)

public static int ReadFully(Stream inStr, byte[] buf, int off, int len)

public static void ValidateBufferArguments(byte[] buffer, int offset, int count)

public static int WriteBufTo(MemoryStream buf, byte[] output, int offset)