diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-12 22:57:06 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-12 22:57:06 +0700 |
commit | 809e86bbf8ed478e7aa7b9de8a3bfc3014289bd5 (patch) | |
tree | 9287ae725992c5972bed155ec4f4773fdace7b22 /crypto/src/security/CipherUtilities.cs | |
parent | Refactoring of "unused bits" changes (diff) | |
download | BouncyCastle.NET-ed25519-809e86bbf8ed478e7aa7b9de8a3bfc3014289bd5.tar.xz |
Review of culture-independent String comparison methods
Diffstat (limited to 'crypto/src/security/CipherUtilities.cs')
-rw-r--r-- | crypto/src/security/CipherUtilities.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/security/CipherUtilities.cs b/crypto/src/security/CipherUtilities.cs index cdb711f69..9ad4228ac 100644 --- a/crypto/src/security/CipherUtilities.cs +++ b/crypto/src/security/CipherUtilities.cs @@ -278,9 +278,9 @@ namespace Org.BouncyCastle.Security - if (algorithm.StartsWith("PBE")) + if (Platform.StartsWith(algorithm, "PBE")) { - if (algorithm.EndsWith("-CBC")) + if (Platform.EndsWith(algorithm, "-CBC")) { if (algorithm == "PBEWITHSHA1ANDDES-CBC") { @@ -305,7 +305,7 @@ namespace Org.BouncyCastle.Security new CbcBlockCipher(new RC2Engine())); } } - else if (algorithm.EndsWith("-BC") || algorithm.EndsWith("-OPENSSL")) + else if (Platform.EndsWith(algorithm, "-BC") || Platform.EndsWith(algorithm, "-OPENSSL")) { if (Strings.IsOneOf(algorithm, "PBEWITHSHAAND128BITAES-CBC-BC", |