diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-04 19:17:38 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-04 19:17:38 +0700 |
commit | 83bc4307036193383a96e3002fb9696d66ce0f48 (patch) | |
tree | 714134b7872ece753180ceefe4de04851236e6de /crypto/src/openpgp | |
parent | Fix warnings (diff) | |
download | BouncyCastle.NET-ed25519-83bc4307036193383a96e3002fb9696d66ce0f48.tar.xz |
Avoid some allocations around MPInteger
Diffstat (limited to 'crypto/src/openpgp')
-rw-r--r-- | crypto/src/openpgp/PgpEncryptedDataGenerator.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/openpgp/PgpEncryptedDataGenerator.cs b/crypto/src/openpgp/PgpEncryptedDataGenerator.cs index f086aaf75..a86dce42d 100644 --- a/crypto/src/openpgp/PgpEncryptedDataGenerator.cs +++ b/crypto/src/openpgp/PgpEncryptedDataGenerator.cs @@ -146,7 +146,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp byte[] paddedSessionData = PgpPad.PadSessionData(sessionInfo, sessionKeyObfuscation); byte[] C = w.Wrap(paddedSessionData, 0, paddedSessionData.Length); - byte[] VB = new MPInteger(new BigInteger(1, ephPub.Q.GetEncoded(false))).GetEncoded(); + byte[] VB = new MPInteger(MPInteger.ToMpiBigInteger(ephPub.Q)).GetEncoded(); byte[] rv = new byte[VB.Length + 1 + C.Length]; |