diff options
-rw-r--r-- | crypto/src/cms/OriginatorId.cs | 4 | ||||
-rw-r--r-- | crypto/src/cms/RecipientId.cs | 2 | ||||
-rw-r--r-- | crypto/src/cms/SignerId.cs | 2 | ||||
-rw-r--r-- | crypto/src/crypto/parameters/DHKeyParameters.cs | 2 | ||||
-rw-r--r-- | crypto/src/crypto/parameters/DHParameters.cs | 2 | ||||
-rw-r--r-- | crypto/src/crypto/parameters/DsaKeyParameters.cs | 2 | ||||
-rw-r--r-- | crypto/src/crypto/parameters/ElGamalKeyParameters.cs | 2 | ||||
-rw-r--r-- | crypto/src/util/io/pem/PemHeader.cs | 4 | ||||
-rw-r--r-- | crypto/src/x509/X509Certificate.cs | 2 | ||||
-rw-r--r-- | crypto/src/x509/X509CertificatePair.cs | 4 |
10 files changed, 12 insertions, 14 deletions
diff --git a/crypto/src/cms/OriginatorId.cs b/crypto/src/cms/OriginatorId.cs index 5a3b7374d..6ae64c503 100644 --- a/crypto/src/cms/OriginatorId.cs +++ b/crypto/src/cms/OriginatorId.cs @@ -1,5 +1,3 @@ -using System; - using Org.BouncyCastle.Asn1.X509; using Org.BouncyCastle.Math; using Org.BouncyCastle.Utilities; @@ -44,7 +42,7 @@ namespace Org.BouncyCastle.Cms return false; return Arrays.AreEqual(SubjectKeyIdentifier, id.SubjectKeyIdentifier) - && Platform.Equals(SerialNumber, id.SerialNumber) + && Objects.Equals(SerialNumber, id.SerialNumber) && IssuersMatch(Issuer, id.Issuer); } } diff --git a/crypto/src/cms/RecipientId.cs b/crypto/src/cms/RecipientId.cs index 9b6eb093b..815f3ff90 100644 --- a/crypto/src/cms/RecipientId.cs +++ b/crypto/src/cms/RecipientId.cs @@ -51,7 +51,7 @@ namespace Org.BouncyCastle.Cms return Arrays.AreEqual(keyIdentifier, id.keyIdentifier) && Arrays.AreEqual(SubjectKeyIdentifier, id.SubjectKeyIdentifier) - && Platform.Equals(SerialNumber, id.SerialNumber) + && Objects.Equals(SerialNumber, id.SerialNumber) && IssuersMatch(Issuer, id.Issuer); } } diff --git a/crypto/src/cms/SignerId.cs b/crypto/src/cms/SignerId.cs index baac9369b..8023ca280 100644 --- a/crypto/src/cms/SignerId.cs +++ b/crypto/src/cms/SignerId.cs @@ -44,7 +44,7 @@ namespace Org.BouncyCastle.Cms return false; return Arrays.AreEqual(SubjectKeyIdentifier, id.SubjectKeyIdentifier) - && Platform.Equals(SerialNumber, id.SerialNumber) + && Objects.Equals(SerialNumber, id.SerialNumber) && IssuersMatch(Issuer, id.Issuer); } } diff --git a/crypto/src/crypto/parameters/DHKeyParameters.cs b/crypto/src/crypto/parameters/DHKeyParameters.cs index 1a5c1386f..8aabddd8b 100644 --- a/crypto/src/crypto/parameters/DHKeyParameters.cs +++ b/crypto/src/crypto/parameters/DHKeyParameters.cs @@ -57,7 +57,7 @@ namespace Org.BouncyCastle.Crypto.Parameters protected bool Equals( DHKeyParameters other) { - return Platform.Equals(parameters, other.parameters) + return Objects.Equals(parameters, other.parameters) && base.Equals(other); } diff --git a/crypto/src/crypto/parameters/DHParameters.cs b/crypto/src/crypto/parameters/DHParameters.cs index bdea12432..a71678a88 100644 --- a/crypto/src/crypto/parameters/DHParameters.cs +++ b/crypto/src/crypto/parameters/DHParameters.cs @@ -167,7 +167,7 @@ namespace Org.BouncyCastle.Crypto.Parameters { return p.Equals(other.p) && g.Equals(other.g) - && Platform.Equals(q, other.q); + && Objects.Equals(q, other.q); } public override int GetHashCode() diff --git a/crypto/src/crypto/parameters/DsaKeyParameters.cs b/crypto/src/crypto/parameters/DsaKeyParameters.cs index 5fe6d7ab4..4097144a5 100644 --- a/crypto/src/crypto/parameters/DsaKeyParameters.cs +++ b/crypto/src/crypto/parameters/DsaKeyParameters.cs @@ -40,7 +40,7 @@ namespace Org.BouncyCastle.Crypto.Parameters protected bool Equals( DsaKeyParameters other) { - return Platform.Equals(parameters, other.parameters) + return Objects.Equals(parameters, other.parameters) && base.Equals(other); } diff --git a/crypto/src/crypto/parameters/ElGamalKeyParameters.cs b/crypto/src/crypto/parameters/ElGamalKeyParameters.cs index 8b6e27957..146049aca 100644 --- a/crypto/src/crypto/parameters/ElGamalKeyParameters.cs +++ b/crypto/src/crypto/parameters/ElGamalKeyParameters.cs @@ -40,7 +40,7 @@ namespace Org.BouncyCastle.Crypto.Parameters protected bool Equals( ElGamalKeyParameters other) { - return Platform.Equals(parameters, other.parameters) + return Objects.Equals(parameters, other.parameters) && base.Equals(other); } diff --git a/crypto/src/util/io/pem/PemHeader.cs b/crypto/src/util/io/pem/PemHeader.cs index c6236f534..b9bf10e34 100644 --- a/crypto/src/util/io/pem/PemHeader.cs +++ b/crypto/src/util/io/pem/PemHeader.cs @@ -38,8 +38,8 @@ namespace Org.BouncyCastle.Utilities.IO.Pem PemHeader other = (PemHeader)obj; - return Platform.Equals(this.name, other.name) - && Platform.Equals(this.val, other.val); + return Objects.Equals(this.name, other.name) + && Objects.Equals(this.val, other.val); } private int GetHashCode(string s) diff --git a/crypto/src/x509/X509Certificate.cs b/crypto/src/x509/X509Certificate.cs index b6749d505..db6966a0f 100644 --- a/crypto/src/x509/X509Certificate.cs +++ b/crypto/src/x509/X509Certificate.cs @@ -731,7 +731,7 @@ namespace Org.BouncyCastle.X509 Asn1Encodable p2 = id2.Parameters; if ((p1 == null) == (p2 == null)) - return Platform.Equals(p1, p2); + return Objects.Equals(p1, p2); // Exactly one of p1, p2 is null at this point return p1 == null diff --git a/crypto/src/x509/X509CertificatePair.cs b/crypto/src/x509/X509CertificatePair.cs index fbeba4dc6..866bb4539 100644 --- a/crypto/src/x509/X509CertificatePair.cs +++ b/crypto/src/x509/X509CertificatePair.cs @@ -101,8 +101,8 @@ namespace Org.BouncyCastle.X509 if (other == null) return false; - return Platform.Equals(this.forward, other.forward) - && Platform.Equals(this.reverse, other.reverse); + return Objects.Equals(this.forward, other.forward) + && Objects.Equals(this.reverse, other.reverse); } public override int GetHashCode() |