summary refs log tree commit diff
path: root/crypto/src/security/MacUtilities.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-11-12 22:57:06 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-11-12 22:57:06 +0700
commit809e86bbf8ed478e7aa7b9de8a3bfc3014289bd5 (patch)
tree9287ae725992c5972bed155ec4f4773fdace7b22 /crypto/src/security/MacUtilities.cs
parentRefactoring of "unused bits" changes (diff)
downloadBouncyCastle.NET-ed25519-809e86bbf8ed478e7aa7b9de8a3bfc3014289bd5.tar.xz
Review of culture-independent String comparison methods
Diffstat (limited to 'crypto/src/security/MacUtilities.cs')
-rw-r--r--crypto/src/security/MacUtilities.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/security/MacUtilities.cs b/crypto/src/security/MacUtilities.cs
index 41cf5e9e2..fab9b1d41 100644
--- a/crypto/src/security/MacUtilities.cs
+++ b/crypto/src/security/MacUtilities.cs
@@ -114,15 +114,15 @@ namespace Org.BouncyCastle.Security
                 mechanism = upper;
             }
 
-            if (mechanism.StartsWith("PBEWITH"))
+            if (Platform.StartsWith(mechanism, "PBEWITH"))
             {
                 mechanism = mechanism.Substring("PBEWITH".Length);
             }
 
-            if (CultureInfo.InvariantCulture.CompareInfo.IsPrefix(mechanism, "HMAC", CompareOptions.Ordinal))
+            if (Platform.StartsWith(mechanism, "HMAC"))
             {
                 string digestName;
-                if (mechanism.StartsWith("HMAC-") || mechanism.StartsWith("HMAC/"))
+                if (Platform.StartsWith(mechanism, "HMAC-") || Platform.StartsWith(mechanism, "HMAC/"))
                 {
                     digestName = mechanism.Substring(5);
                 }