summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs b/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs
index 28c883e06..d9a039a4f 100644
--- a/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs
+++ b/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs
@@ -183,7 +183,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
             uint[] t2 = x2;
             SecP256K1Field.Square(t1, t2);
 
-            return Arrays.AreEqual(x1, t2) ? new SecP256K1FieldElement(t1) : null;
+            return Nat256.Eq(x1, t2) ? new SecP256K1FieldElement(t1) : null;
         }
 
         public override bool Equals(object obj)
@@ -202,12 +202,12 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
                 return true;
             if (null == other)
                 return false;
-            return Arrays.AreEqual(x, other.x);
+            return Nat256.Eq(x, other.x);
         }
 
         public override int GetHashCode()
         {
-            return Q.GetHashCode() ^ Arrays.GetHashCode(x);
+            return Q.GetHashCode() ^ Arrays.GetHashCode(x, 0, 8);
         }
     }
 }