From 7f43ba84bd30b99d0e957920aa660a45f998c522 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sat, 5 Nov 2022 15:40:09 +0700 Subject: Port OpenPGP support for XDH, EdDSA from bc-java - see https://github.com/bcgit/bc-csharp/issues/345 --- crypto/src/bcpg/ECSecretBCPGKey.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'crypto/src/bcpg/ECSecretBCPGKey.cs') diff --git a/crypto/src/bcpg/ECSecretBCPGKey.cs b/crypto/src/bcpg/ECSecretBCPGKey.cs index 22e0a3473..eef632263 100644 --- a/crypto/src/bcpg/ECSecretBCPGKey.cs +++ b/crypto/src/bcpg/ECSecretBCPGKey.cs @@ -1,6 +1,5 @@ using System; -using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Math; namespace Org.BouncyCastle.Bcpg @@ -9,18 +8,18 @@ namespace Org.BouncyCastle.Bcpg public class ECSecretBcpgKey : BcpgObject, IBcpgKey { - internal MPInteger x; + internal readonly MPInteger m_x; public ECSecretBcpgKey( BcpgInputStream bcpgIn) { - this.x = new MPInteger(bcpgIn); + m_x = new MPInteger(bcpgIn); } public ECSecretBcpgKey( BigInteger x) { - this.x = new MPInteger(x); + m_x = new MPInteger(x); } /// The format, as a string, always "PGP". @@ -45,12 +44,12 @@ namespace Org.BouncyCastle.Bcpg public override void Encode( BcpgOutputStream bcpgOut) { - bcpgOut.WriteObject(x); + bcpgOut.WriteObject(m_x); } public virtual BigInteger X { - get { return x.Value; } + get { return m_x.Value; } } } } -- cgit 1.4.1