summary refs log tree commit diff
path: root/crypto/src/bcpg/ECPublicBCPGKey.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-10-04 19:17:38 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-10-04 19:17:38 +0700
commit83bc4307036193383a96e3002fb9696d66ce0f48 (patch)
tree714134b7872ece753180ceefe4de04851236e6de /crypto/src/bcpg/ECPublicBCPGKey.cs
parentFix warnings (diff)
downloadBouncyCastle.NET-ed25519-83bc4307036193383a96e3002fb9696d66ce0f48.tar.xz
Avoid some allocations around MPInteger
Diffstat (limited to 'crypto/src/bcpg/ECPublicBCPGKey.cs')
-rw-r--r--crypto/src/bcpg/ECPublicBCPGKey.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/bcpg/ECPublicBCPGKey.cs b/crypto/src/bcpg/ECPublicBCPGKey.cs
index 4733ee6c9..560c6ad05 100644
--- a/crypto/src/bcpg/ECPublicBCPGKey.cs
+++ b/crypto/src/bcpg/ECPublicBCPGKey.cs
@@ -26,7 +26,7 @@ namespace Org.BouncyCastle.Bcpg
             DerObjectIdentifier oid,
             ECPoint point)
         {
-            this.point = new BigInteger(1, point.GetEncoded(false));
+            this.point = MPInteger.ToMpiBigInteger(point);
             this.oid = oid;
         }