diff options
author | David Hook <david.hook@keyfactor.com> | 2022-10-29 18:56:29 +1100 |
---|---|---|
committer | David Hook <david.hook@keyfactor.com> | 2022-10-29 18:56:29 +1100 |
commit | 590610a1faf81601756bfc683154446802157c86 (patch) | |
tree | 871ef215c63025dfea08a4cdd99120ad8a07fa45 /crypto/src/util/io/Streams.cs | |
parent | Merge remote-tracking branch 'refs/remotes/origin/master' (diff) | |
parent | Release preparations (diff) | |
download | BouncyCastle.NET-ed25519-590610a1faf81601756bfc683154446802157c86.tar.xz |
resolve conflicts
Diffstat (limited to 'crypto/src/util/io/Streams.cs')
-rw-r--r-- | crypto/src/util/io/Streams.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/crypto/src/util/io/Streams.cs b/crypto/src/util/io/Streams.cs index c23332909..da8f01068 100644 --- a/crypto/src/util/io/Streams.cs +++ b/crypto/src/util/io/Streams.cs @@ -3,14 +3,10 @@ using System.IO; namespace Org.BouncyCastle.Utilities.IO { - public sealed class Streams + public static class Streams { private const int BufferSize = 4096; - private Streams() - { - } - public static void Drain(Stream inStr) { inStr.CopyTo(Stream.Null, BufferSize); @@ -64,7 +60,12 @@ namespace Org.BouncyCastle.Utilities.IO return buf.ToArray(); } - public static byte[] ReadAllLimited(Stream inStr, int limit) + public static byte[] ReadAll(MemoryStream inStr) + { + return inStr.ToArray(); + } + + public static byte[] ReadAllLimited(Stream inStr, int limit) { MemoryStream buf = new MemoryStream(); PipeAllLimited(inStr, limit, buf); |