From 7519bacebd39868c9970799ad41ede7892a4a68d Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 24 May 2021 19:47:33 +0700 Subject: Fix project files plus portability fixes --- crypto/src/util/io/Streams.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'crypto/src/util/io') diff --git a/crypto/src/util/io/Streams.cs b/crypto/src/util/io/Streams.cs index 503a1b4f1..506b2489f 100644 --- a/crypto/src/util/io/Streams.cs +++ b/crypto/src/util/io/Streams.cs @@ -100,15 +100,9 @@ namespace Org.BouncyCastle.Utilities.IO /// public static int WriteBufTo(MemoryStream buf, byte[] output, int offset) { -#if PORTABLE - byte[] bytes = buf.ToArray(); - bytes.CopyTo(output, offset); - return bytes.Length; -#else int size = (int)buf.Length; - buf.WriteTo(new MemoryStream(output, offset, size, true)); + WriteBufTo(buf, new MemoryStream(output, offset, size)); return size; -#endif } public static void WriteZeroes(Stream outStr, long count) -- cgit 1.5.1