summary refs log tree commit diff
path: root/crypto/src/bcpg
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-11-04 16:11:28 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-11-04 16:11:28 +0700
commited2134bdcf763b2b6a11742911b4c5efd1de4550 (patch)
treeb23f6dfb1ee88ddc393276229c014204b42aea22 /crypto/src/bcpg
parentPerform counter increment without branches (diff)
downloadBouncyCastle.NET-ed25519-ed2134bdcf763b2b6a11742911b4c5efd1de4550.tar.xz
Change Close calls to Dispose calls for PORTABLE
Diffstat (limited to 'crypto/src/bcpg')
-rw-r--r--crypto/src/bcpg/ArmoredInputStream.cs2
-rw-r--r--crypto/src/bcpg/BcpgInputStream.cs3
-rw-r--r--crypto/src/bcpg/BcpgOutputStream.cs3
-rw-r--r--crypto/src/bcpg/PublicKeyEncSessionPacket.cs2
4 files changed, 6 insertions, 4 deletions
diff --git a/crypto/src/bcpg/ArmoredInputStream.cs b/crypto/src/bcpg/ArmoredInputStream.cs
index 3109dd4fd..8d17bfa62 100644
--- a/crypto/src/bcpg/ArmoredInputStream.cs
+++ b/crypto/src/bcpg/ArmoredInputStream.cs
@@ -506,7 +506,7 @@ namespace Org.BouncyCastle.Bcpg
 
 		public override void Close()
 		{
-			input.Close();
+            Platform.Dispose(input);
 			base.Close();
 		}
     }
diff --git a/crypto/src/bcpg/BcpgInputStream.cs b/crypto/src/bcpg/BcpgInputStream.cs
index 2e08cd090..37c259d42 100644
--- a/crypto/src/bcpg/BcpgInputStream.cs
+++ b/crypto/src/bcpg/BcpgInputStream.cs
@@ -2,6 +2,7 @@ using System;
 using System.IO;
 
 using Org.BouncyCastle.Asn1;
+using Org.BouncyCastle.Utilities;
 using Org.BouncyCastle.Utilities.IO;
 
 namespace Org.BouncyCastle.Bcpg
@@ -248,7 +249,7 @@ namespace Org.BouncyCastle.Bcpg
 
 		public override void Close()
 		{
-			m_in.Close();
+            Platform.Dispose(m_in);
 			base.Close();
 		}
 
diff --git a/crypto/src/bcpg/BcpgOutputStream.cs b/crypto/src/bcpg/BcpgOutputStream.cs
index 204f65b50..581897ece 100644
--- a/crypto/src/bcpg/BcpgOutputStream.cs
+++ b/crypto/src/bcpg/BcpgOutputStream.cs
@@ -1,6 +1,7 @@
 using System;
 using System.IO;
 
+using Org.BouncyCastle.Utilities;
 using Org.BouncyCastle.Utilities.IO;
 
 namespace Org.BouncyCastle.Bcpg
@@ -383,7 +384,7 @@ namespace Org.BouncyCastle.Bcpg
         {
 			this.Finish();
 			outStr.Flush();
-			outStr.Close();
+            Platform.Dispose(outStr);
 			base.Close();
         }
     }
diff --git a/crypto/src/bcpg/PublicKeyEncSessionPacket.cs b/crypto/src/bcpg/PublicKeyEncSessionPacket.cs
index 74d04f7aa..831b5a189 100644
--- a/crypto/src/bcpg/PublicKeyEncSessionPacket.cs
+++ b/crypto/src/bcpg/PublicKeyEncSessionPacket.cs
@@ -107,7 +107,7 @@ namespace Org.BouncyCastle.Bcpg
                 pOut.Write(data[i]);
             }
 
-            pOut.Close();
+            Platform.Dispose(pOut);
 
             bcpgOut.WritePacket(PacketTag.PublicKeyEncryptedSession , bOut.ToArray(), true);
 		}