summary refs log tree commit diff
path: root/crypto/test/src/math
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-02-09 12:39:14 +0800
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-02-09 12:39:14 +0800
commit9e7e297cebc49e7fece3d4190506290fd70ccf5e (patch)
tree2135035fc89819df17d84f7e3c809039cafc3dd0 /crypto/test/src/math
parentProvide SumOfMultiplies as an arbitrary-length generalization of SumOfTwoMult... (diff)
downloadBouncyCastle.NET-ed25519-9e7e297cebc49e7fece3d4190506290fd70ccf5e.tar.xz
Use GetEncoded(boolean) instead of deprecated constructor
Diffstat (limited to 'crypto/test/src/math')
-rw-r--r--crypto/test/src/math/ec/test/ECPointTest.cs10
1 files changed, 3 insertions, 7 deletions
diff --git a/crypto/test/src/math/ec/test/ECPointTest.cs b/crypto/test/src/math/ec/test/ECPointTest.cs
index 64bd53cec..f4ee07b6b 100644
--- a/crypto/test/src/math/ec/test/ECPointTest.cs
+++ b/crypto/test/src/math/ec/test/ECPointTest.cs
@@ -416,16 +416,12 @@ namespace Org.BouncyCastle.Math.EC.Tests
         private void ImplTestEncoding(ECPoint p)
         {
             // Not Point Compression
-            ECPoint unCompP = p.Curve.CreatePoint(p.AffineXCoord.ToBigInteger(), p.AffineYCoord.ToBigInteger(), false);
-
-            // Point compression
-            ECPoint compP = p.Curve.CreatePoint(p.AffineXCoord.ToBigInteger(), p.AffineYCoord.ToBigInteger(), true);
-
-            byte[] unCompBarr = unCompP.GetEncoded();
+            byte[] unCompBarr = p.GetEncoded(false);
             ECPoint decUnComp = p.Curve.DecodePoint(unCompBarr);
             AssertPointsEqual("Error decoding uncompressed point", p, decUnComp);
 
-            byte[] compBarr = compP.GetEncoded();
+            // Point compression
+            byte[] compBarr = p.GetEncoded(true);
             ECPoint decComp = p.Curve.DecodePoint(compBarr);
             AssertPointsEqual("Error decoding compressed point", p, decComp);
         }