diff --git a/crypto/src/openpgp/PgpEncryptedData.cs b/crypto/src/openpgp/PgpEncryptedData.cs
index 0d237b56c..558e0b8a2 100644
--- a/crypto/src/openpgp/PgpEncryptedData.cs
+++ b/crypto/src/openpgp/PgpEncryptedData.cs
@@ -81,7 +81,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
Array.Copy(lookAhead, bufStart, buf, pos, len);
bufStart += len;
- return pos + len - off;;
+ return pos + len - off;
}
internal byte[] GetLookAhead()
diff --git a/crypto/src/openpgp/PgpLiteralDataGenerator.cs b/crypto/src/openpgp/PgpLiteralDataGenerator.cs
index 96078bf3e..7672659ca 100644
--- a/crypto/src/openpgp/PgpLiteralDataGenerator.cs
+++ b/crypto/src/openpgp/PgpLiteralDataGenerator.cs
@@ -142,7 +142,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
}
#if !PORTABLE || DOTNET
- /// <summary>
+ /// <summary>
/// <p>
/// Open a literal data packet for the passed in <c>FileInfo</c> object, returning
/// an output stream for saving the file contents.
diff --git a/crypto/src/openpgp/PgpPublicKeyRing.cs b/crypto/src/openpgp/PgpPublicKeyRing.cs
index 7b1ac93bf..92464d64f 100644
--- a/crypto/src/openpgp/PgpPublicKeyRing.cs
+++ b/crypto/src/openpgp/PgpPublicKeyRing.cs
@@ -45,7 +45,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
+ "tag 0x" + ((int)initialTag).ToString("X"));
}
- PublicKeyPacket pubPk = (PublicKeyPacket) bcpgInput.ReadPacket();;
+ PublicKeyPacket pubPk = (PublicKeyPacket) bcpgInput.ReadPacket();
TrustPacket trustPk = ReadOptionalTrustPacket(bcpgInput);
// direct signatures and revocations
diff --git a/crypto/src/openpgp/PgpPublicKeyRingBundle.cs b/crypto/src/openpgp/PgpPublicKeyRingBundle.cs
index 519a2f884..91113e904 100644
--- a/crypto/src/openpgp/PgpPublicKeyRingBundle.cs
+++ b/crypto/src/openpgp/PgpPublicKeyRingBundle.cs
@@ -52,7 +52,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
if (pgpPub == null)
{
- throw new PgpException(obj.GetType().FullName + " found where PgpPublicKeyRing expected");
+ throw new PgpException(Platform.GetTypeName(obj) + " found where PgpPublicKeyRing expected");
}
long key = pgpPub.GetPublicKey().KeyId;
@@ -113,7 +113,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
if (ignoreCase)
{
- userId = Platform.ToLowerInvariant(userId);
+ userId = Platform.ToUpperInvariant(userId);
}
foreach (PgpPublicKeyRing pubRing in GetKeyRings())
@@ -123,12 +123,12 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
string next = nextUserID;
if (ignoreCase)
{
- next = Platform.ToLowerInvariant(next);
+ next = Platform.ToUpperInvariant(next);
}
if (matchPartial)
{
- if (next.IndexOf(userId) > -1)
+ if (Platform.IndexOf(next, userId) > -1)
{
rings.Add(pubRing);
}
diff --git a/crypto/src/openpgp/PgpSecretKey.cs b/crypto/src/openpgp/PgpSecretKey.cs
index d3811c44c..b3986073d 100644
--- a/crypto/src/openpgp/PgpSecretKey.cs
+++ b/crypto/src/openpgp/PgpSecretKey.cs
@@ -1204,7 +1204,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
string curveID = SXprUtilities.ReadString(inputStream, inputStream.ReadByte());
curveName = SXprUtilities.ReadString(inputStream, inputStream.ReadByte());
- if (curveName.StartsWith("NIST "))
+ if (Platform.StartsWith(curveName, "NIST "))
{
curveName = curveName.Substring("NIST ".Length);
}
diff --git a/crypto/src/openpgp/PgpSecretKeyRingBundle.cs b/crypto/src/openpgp/PgpSecretKeyRingBundle.cs
index 12c7c098c..c9f4d3959 100644
--- a/crypto/src/openpgp/PgpSecretKeyRingBundle.cs
+++ b/crypto/src/openpgp/PgpSecretKeyRingBundle.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections;
-using System.Globalization;
using System.IO;
using Org.BouncyCastle.Utilities;
@@ -53,7 +52,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
if (pgpSecret == null)
{
- throw new PgpException(obj.GetType().FullName + " found where PgpSecretKeyRing expected");
+ throw new PgpException(Platform.GetTypeName(obj) + " found where PgpSecretKeyRing expected");
}
long key = pgpSecret.GetPublicKey().KeyId;
@@ -114,7 +113,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
if (ignoreCase)
{
- userId = Platform.ToLowerInvariant(userId);
+ userId = Platform.ToUpperInvariant(userId);
}
foreach (PgpSecretKeyRing secRing in GetKeyRings())
@@ -124,12 +123,12 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
string next = nextUserID;
if (ignoreCase)
{
- next = Platform.ToLowerInvariant(next);
+ next = Platform.ToUpperInvariant(next);
}
if (matchPartial)
{
- if (next.IndexOf(userId) > -1)
+ if (Platform.IndexOf(next, userId) > -1)
{
rings.Add(secRing);
}
|