summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2018-10-11 14:03:04 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2018-10-11 14:03:04 +0700
commit5ba9e204beece4bc46f7f9e39693459bea7ab06a (patch)
tree7bbbecc137dcad89dc7f7f9b72faaedeaccfa7a7
parentFix unmarked key regression (diff)
downloadBouncyCastle.NET-ed25519-5ba9e204beece4bc46f7f9e39693459bea7ab06a.tar.xz
More PORTABLE fixes
-rw-r--r--crypto/src/crypto/generators/OpenBsdBCrypt.cs4
-rw-r--r--crypto/src/crypto/prng/ThreadedSeedGenerator.cs2
2 files changed, 5 insertions, 1 deletions
diff --git a/crypto/src/crypto/generators/OpenBsdBCrypt.cs b/crypto/src/crypto/generators/OpenBsdBCrypt.cs
index 49f79f95b..da6e2b952 100644
--- a/crypto/src/crypto/generators/OpenBsdBCrypt.cs
+++ b/crypto/src/crypto/generators/OpenBsdBCrypt.cs
@@ -174,7 +174,11 @@ namespace Org.BouncyCastle.Crypto.Generators
             }
             catch (Exception nfe)
             {
+#if PORTABLE
+                throw new ArgumentException("Invalid cost factor: " + bcryptString.Substring(4, 2), "bcryptString");
+#else
                 throw new ArgumentException("Invalid cost factor: " + bcryptString.Substring(4, 2), "bcryptString", nfe);
+#endif
             }
             if (cost < 4 || cost > 31)
                 throw new ArgumentException("Invalid cost factor: " + cost + ", 4 < cost < 31 expected.");
diff --git a/crypto/src/crypto/prng/ThreadedSeedGenerator.cs b/crypto/src/crypto/prng/ThreadedSeedGenerator.cs
index 7412e4919..f12b832ee 100644
--- a/crypto/src/crypto/prng/ThreadedSeedGenerator.cs
+++ b/crypto/src/crypto/prng/ThreadedSeedGenerator.cs
@@ -113,7 +113,7 @@ namespace Org.BouncyCastle.Crypto.Prng
                 finally
                 {
 #if PORTABLE
-                    autoResetEvent.Close();
+                    autoResetEvent.Dispose();
 #endif
                 }