diff options
Diffstat (limited to 'crypto/src/asn1/x9/DHDomainParameters.cs')
-rw-r--r-- | crypto/src/asn1/x9/DHDomainParameters.cs | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/crypto/src/asn1/x9/DHDomainParameters.cs b/crypto/src/asn1/x9/DHDomainParameters.cs index b8c1ac030..a92322717 100644 --- a/crypto/src/asn1/x9/DHDomainParameters.cs +++ b/crypto/src/asn1/x9/DHDomainParameters.cs @@ -98,21 +98,11 @@ namespace Org.BouncyCastle.Asn1.X9 get { return this.validationParms; } } - public override Asn1Object ToAsn1Object() - { - Asn1EncodableVector v = new Asn1EncodableVector(p, g, q); - - if (this.j != null) - { - v.Add(this.j); - } - - if (this.validationParms != null) - { - v.Add(this.validationParms); - } - - return new DerSequence(v); - } + public override Asn1Object ToAsn1Object() + { + Asn1EncodableVector v = new Asn1EncodableVector(p, g, q); + v.AddOptional(j, validationParms); + return new DerSequence(v); + } } } |