diff options
Diffstat (limited to 'crypto/src/security/SecureRandom.cs')
-rw-r--r-- | crypto/src/security/SecureRandom.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/security/SecureRandom.cs b/crypto/src/security/SecureRandom.cs index 866a2cf0d..ac9d98158 100644 --- a/crypto/src/security/SecureRandom.cs +++ b/crypto/src/security/SecureRandom.cs @@ -1,9 +1,9 @@ using System; -using System.Globalization; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Digests; using Org.BouncyCastle.Crypto.Prng; +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Security { @@ -41,7 +41,7 @@ namespace Org.BouncyCastle.Security // TODO Compared to JDK, we don't auto-seed if the client forgets - problem? // TODO Support all digests more generally, by stripping PRNG and calling DigestUtilities? - string drgName = algorithm.ToUpperInvariant(); + string drgName = Platform.ToUpperInvariant(algorithm); IRandomGenerator drg = null; if (drgName == "SHA1PRNG") @@ -136,7 +136,7 @@ namespace Org.BouncyCastle.Security if (maxValue < 2) { if (maxValue < 0) - throw new ArgumentOutOfRangeException("maxValue < 0"); + throw new ArgumentOutOfRangeException("maxValue", "cannot be negative"); return 0; } |