summary refs log tree commit diff
path: root/crypto/src/openpgp
diff options
context:
space:
mode:
authorOren Novotny <oren@novotny.org>2015-11-22 12:52:48 -0500
committerOren Novotny <oren@novotny.org>2015-11-22 12:52:48 -0500
commitc2bc6d18b888c0a3d3d1177e7c049f042dcae3ac (patch)
tree5d2da28f9361f54df868f0d8a4865ca57ae73c6b /crypto/src/openpgp
parentupdate build script (diff)
parentMerge branch 'master' of git.bouncycastle.org:bc-csharp into pcl (diff)
downloadBouncyCastle.NET-ed25519-c2bc6d18b888c0a3d3d1177e7c049f042dcae3ac.tar.xz
Merge pull request #14 from peterdettman/pcl
Updates everything to the bc-csharp 1.8.0 release tag
Diffstat (limited to 'crypto/src/openpgp')
-rw-r--r--crypto/src/openpgp/PgpEncryptedData.cs2
-rw-r--r--crypto/src/openpgp/PgpLiteralDataGenerator.cs2
-rw-r--r--crypto/src/openpgp/PgpPublicKeyRing.cs2
-rw-r--r--crypto/src/openpgp/PgpPublicKeyRingBundle.cs8
-rw-r--r--crypto/src/openpgp/PgpSecretKey.cs2
-rw-r--r--crypto/src/openpgp/PgpSecretKeyRingBundle.cs9
6 files changed, 12 insertions, 13 deletions
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); }