diff options
Diffstat (limited to 'crypto/src/asn1/cryptopro/GOST3410ParamSetParameters.cs')
-rw-r--r-- | crypto/src/asn1/cryptopro/GOST3410ParamSetParameters.cs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/crypto/src/asn1/cryptopro/GOST3410ParamSetParameters.cs b/crypto/src/asn1/cryptopro/GOST3410ParamSetParameters.cs index ee6ed8c99..c82e4248a 100644 --- a/crypto/src/asn1/cryptopro/GOST3410ParamSetParameters.cs +++ b/crypto/src/asn1/cryptopro/GOST3410ParamSetParameters.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using Org.BouncyCastle.Math; using Org.BouncyCastle.Utilities; @@ -12,25 +11,18 @@ namespace Org.BouncyCastle.Asn1.CryptoPro private readonly int keySize; private readonly DerInteger p, q, a; - public static Gost3410ParamSetParameters GetInstance( - Asn1TaggedObject obj, - bool explicitly) + public static Gost3410ParamSetParameters GetInstance(Asn1TaggedObject obj, bool explicitly) { return GetInstance(Asn1Sequence.GetInstance(obj, explicitly)); } - public static Gost3410ParamSetParameters GetInstance( - object obj) + public static Gost3410ParamSetParameters GetInstance(object obj) { if (obj == null || obj is Gost3410ParamSetParameters) - { return (Gost3410ParamSetParameters) obj; - } - if (obj is Asn1Sequence) - { - return new Gost3410ParamSetParameters((Asn1Sequence) obj); - } + if (obj is Asn1Sequence seq) + return new Gost3410ParamSetParameters(seq); throw new ArgumentException("Invalid GOST3410Parameter: " + Platform.GetTypeName(obj)); } |