summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src')
-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 }