summary refs log tree commit diff
path: root/crypto/src/security
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/security')
-rw-r--r--crypto/src/security/MacUtilities.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/src/security/MacUtilities.cs b/crypto/src/security/MacUtilities.cs
index d7fe91142..41cf5e9e2 100644
--- a/crypto/src/security/MacUtilities.cs
+++ b/crypto/src/security/MacUtilities.cs
@@ -1,4 +1,6 @@
+using System;
 using System.Collections;
+using System.Globalization;
 
 using Org.BouncyCastle.Asn1;
 using Org.BouncyCastle.Asn1.Iana;
@@ -117,7 +119,7 @@ namespace Org.BouncyCastle.Security
                 mechanism = mechanism.Substring("PBEWITH".Length);
             }
 
-            if (mechanism.StartsWith("HMAC"))
+            if (CultureInfo.InvariantCulture.CompareInfo.IsPrefix(mechanism, "HMAC", CompareOptions.Ordinal))
             {
                 string digestName;
                 if (mechanism.StartsWith("HMAC-") || mechanism.StartsWith("HMAC/"))