diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2018-10-11 14:03:04 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2018-10-11 14:03:04 +0700 |
commit | 5ba9e204beece4bc46f7f9e39693459bea7ab06a (patch) | |
tree | 7bbbecc137dcad89dc7f7f9b72faaedeaccfa7a7 /crypto/src | |
parent | Fix unmarked key regression (diff) | |
download | BouncyCastle.NET-ed25519-5ba9e204beece4bc46f7f9e39693459bea7ab06a.tar.xz |
More PORTABLE fixes
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/crypto/generators/OpenBsdBCrypt.cs | 4 | ||||
-rw-r--r-- | crypto/src/crypto/prng/ThreadedSeedGenerator.cs | 2 |
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 } |