summary refs log tree commit diff
path: root/crypto/src/util
diff options
context:
space:
mode:
authorDavid Hook <dgh@bouncycastle.org>2019-01-15 11:01:18 +1100
committerDavid Hook <dgh@bouncycastle.org>2019-01-15 11:01:18 +1100
commitf25f7bed6807096d9a67d31f547398c1f6f213e4 (patch)
treee05afc98f495985870a7b4edbf8ab45f63a75e68 /crypto/src/util
parentadded alg constructor (diff)
downloadBouncyCastle.NET-ed25519-f25f7bed6807096d9a67d31f547398c1f6f213e4.tar.xz
first cut on Pkcs8
Diffstat (limited to 'crypto/src/util')
-rw-r--r--crypto/src/util/io/MemoryInputStream.cs13
-rw-r--r--crypto/src/util/io/MemoryOutputStream.cs10
2 files changed, 23 insertions, 0 deletions
diff --git a/crypto/src/util/io/MemoryInputStream.cs b/crypto/src/util/io/MemoryInputStream.cs
new file mode 100644
index 000000000..d353314ee
--- /dev/null
+++ b/crypto/src/util/io/MemoryInputStream.cs
@@ -0,0 +1,13 @@
+using System.IO;
+
+namespace Org.BouncyCastle.Utilities.IO
+{
+    public class MemoryInputStream : MemoryStream
+    {
+        public MemoryInputStream(byte[] buffer) : base(buffer, false)
+        {
+        }
+
+        public sealed override bool CanWrite { get { return false; } }
+    }
+}
diff --git a/crypto/src/util/io/MemoryOutputStream.cs b/crypto/src/util/io/MemoryOutputStream.cs
new file mode 100644
index 000000000..a6de64680
--- /dev/null
+++ b/crypto/src/util/io/MemoryOutputStream.cs
@@ -0,0 +1,10 @@
+
+using System.IO;
+
+namespace Org.BouncyCastle.Utilities.IO
+{
+    public class MemoryOutputStream: MemoryStream
+    {
+        public sealed override bool CanRead { get { return false; } }
+    }
+}