diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-02-09 12:39:14 +0800 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-02-09 12:39:14 +0800 |
commit | 9e7e297cebc49e7fece3d4190506290fd70ccf5e (patch) | |
tree | 2135035fc89819df17d84f7e3c809039cafc3dd0 /crypto/test/src/math | |
parent | Provide SumOfMultiplies as an arbitrary-length generalization of SumOfTwoMult... (diff) | |
download | BouncyCastle.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.cs | 10 |
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); } |