1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/security/SecureRandom.cs b/crypto/src/security/SecureRandom.cs
index 5bad57a14..4894a93e6 100644
--- a/crypto/src/security/SecureRandom.cs
+++ b/crypto/src/security/SecureRandom.cs
@@ -91,7 +91,7 @@ namespace Org.BouncyCastle.Security
public static SecureRandom GetInstance(string algorithm, bool autoSeed)
{
string upper = Platform.ToUpperInvariant(algorithm);
- if (upper.EndsWith("PRNG"))
+ if (Platform.EndsWith(upper, "PRNG"))
{
string digestName = upper.Substring(0, upper.Length - "PRNG".Length);
DigestRandomGenerator prng = CreatePrng(digestName, autoSeed);
|