diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-24 20:04:26 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2024-06-24 20:04:26 +0700 |
commit | 438dc8d53aac9b7483a2014cd4398b8275c496ab (patch) | |
tree | d4e53f01313d43c20cf32ae5c930e0d54a364114 /crypto/src/asn1/x9/X962Parameters.cs | |
parent | Add TODO (diff) | |
download | BouncyCastle.NET-ed25519-438dc8d53aac9b7483a2014cd4398b8275c496ab.tar.xz |
ASN.1: Use GetTagged with cursor methods
- Add GetTagged method for all CHOICE types - Make most Asn1Utilities methods public
Diffstat (limited to '')
-rw-r--r-- | crypto/src/asn1/x9/X962Parameters.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crypto/src/asn1/x9/X962Parameters.cs b/crypto/src/asn1/x9/X962Parameters.cs index af1fce1db..e90472a1b 100644 --- a/crypto/src/asn1/x9/X962Parameters.cs +++ b/crypto/src/asn1/x9/X962Parameters.cs @@ -35,12 +35,13 @@ namespace Org.BouncyCastle.Asn1.X9 throw new ArgumentException("unknown object in GetInstance()"); } - public static X962Parameters GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) - { - return Asn1Utilities.GetInstanceFromChoice(taggedObject, declaredExplicit, GetInstance); - } + public static X962Parameters GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) => + Asn1Utilities.GetInstanceChoice(taggedObject, declaredExplicit, GetInstance); - public X962Parameters( + public static X962Parameters GetTagged(Asn1TaggedObject taggedObject, bool declaredExplicit) => + Asn1Utilities.GetTaggedChoice(taggedObject, declaredExplicit, GetInstance); + + public X962Parameters( X9ECParameters ecParameters) { this._params = ecParameters.ToAsn1Object(); |