summary refs log tree commit diff
path: root/crypto/src/openssl
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/openssl
parentRefactoring of "unused bits" changes (diff)
downloadBouncyCastle.NET-ed25519-809e86bbf8ed478e7aa7b9de8a3bfc3014289bd5.tar.xz
Review of culture-independent String comparison methods
Diffstat (limited to 'crypto/src/openssl')
-rw-r--r--crypto/src/openssl/MiscPemGenerator.cs2
-rw-r--r--crypto/src/openssl/PEMReader.cs4
2 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/openssl/MiscPemGenerator.cs b/crypto/src/openssl/MiscPemGenerator.cs
index 568465fe4..443e446f7 100644
--- a/crypto/src/openssl/MiscPemGenerator.cs
+++ b/crypto/src/openssl/MiscPemGenerator.cs
@@ -197,7 +197,7 @@ namespace Org.BouncyCastle.OpenSsl
                 dekAlgName = "DES-EDE3-CBC";
             }
 
-            int ivLength = dekAlgName.StartsWith("AES-") ? 16 : 8;
+            int ivLength = Platform.StartsWith(dekAlgName, "AES-") ? 16 : 8;
 
             byte[] iv = new byte[ivLength];
             random.NextBytes(iv);
diff --git a/crypto/src/openssl/PEMReader.cs b/crypto/src/openssl/PEMReader.cs
index ec5d1b414..987f4471c 100644
--- a/crypto/src/openssl/PEMReader.cs
+++ b/crypto/src/openssl/PEMReader.cs
@@ -93,7 +93,7 @@ namespace Org.BouncyCastle.OpenSsl
 //			if (parsers.Contains(obj.Type))
 //				return ((PemObjectParser)parsers[obj.Type]).ParseObject(obj);
 
-            if (obj.Type.EndsWith("PRIVATE KEY"))
+            if (Platform.EndsWith(obj.Type, "PRIVATE KEY"))
                 return ReadPrivateKey(obj);
 
             switch (obj.Type)
@@ -233,7 +233,7 @@ namespace Org.BouncyCastle.OpenSsl
             //
             // extract the key
             //
-            Debug.Assert(pemObject.Type.EndsWith("PRIVATE KEY"));
+            Debug.Assert(Platform.EndsWith(pemObject.Type, "PRIVATE KEY"));
 
             string type = pemObject.Type.Substring(0, pemObject.Type.Length - "PRIVATE KEY".Length).Trim();
             byte[] keyBytes = pemObject.Content;