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/x509 | |
parent | Refactoring of "unused bits" changes (diff) | |
download | BouncyCastle.NET-ed25519-809e86bbf8ed478e7aa7b9de8a3bfc3014289bd5.tar.xz |
Review of culture-independent String comparison methods
Diffstat (limited to '')
-rw-r--r-- | crypto/src/x509/PEMParser.cs | 5 | ||||
-rw-r--r-- | crypto/src/x509/X509SignatureUtil.cs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/crypto/src/x509/PEMParser.cs b/crypto/src/x509/PEMParser.cs index 8c117f323..28f28ee0a 100644 --- a/crypto/src/x509/PEMParser.cs +++ b/crypto/src/x509/PEMParser.cs @@ -3,6 +3,7 @@ using System.IO; using System.Text; using Org.BouncyCastle.Asn1; +using Org.BouncyCastle.Utilities; using Org.BouncyCastle.Utilities.Encoders; namespace Org.BouncyCastle.X509 @@ -59,7 +60,7 @@ namespace Org.BouncyCastle.X509 while ((line = ReadLine(inStream)) != null) { - if (line.StartsWith(_header1) || line.StartsWith(_header2)) + if (Platform.StartsWith(line, _header1) || Platform.StartsWith(line, _header2)) { break; } @@ -67,7 +68,7 @@ namespace Org.BouncyCastle.X509 while ((line = ReadLine(inStream)) != null) { - if (line.StartsWith(_footer1) || line.StartsWith(_footer2)) + if (Platform.StartsWith(line, _footer1) || Platform.StartsWith(line, _footer2)) { break; } diff --git a/crypto/src/x509/X509SignatureUtil.cs b/crypto/src/x509/X509SignatureUtil.cs index 858b8f446..83863aee1 100644 --- a/crypto/src/x509/X509SignatureUtil.cs +++ b/crypto/src/x509/X509SignatureUtil.cs @@ -34,7 +34,7 @@ namespace Org.BouncyCastle.X509 // throw new SignatureException("IOException decoding parameters: " + e.Message); // } // -// if (signature.getAlgorithm().EndsWith("MGF1")) +// if (Platform.EndsWith(signature.getAlgorithm(), "MGF1")) // { // try // { |