summary refs log tree commit diff
path: root/crypto/src/asn1/cryptopro/GOST28147Parameters.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-27 21:11:59 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-27 21:11:59 +0700
commit35cfd51633bbbbc92c2c17c76646e9a9dc945b11 (patch)
tree563cda15bf08c63de832198be2b9e0263bae5e60 /crypto/src/asn1/cryptopro/GOST28147Parameters.cs
parentSplit up fast/slow tests (diff)
downloadBouncyCastle.NET-ed25519-35cfd51633bbbbc92c2c17c76646e9a9dc945b11.tar.xz
Generics migration in Asn1
Diffstat (limited to 'crypto/src/asn1/cryptopro/GOST28147Parameters.cs')
-rw-r--r--crypto/src/asn1/cryptopro/GOST28147Parameters.cs19
1 files changed, 5 insertions, 14 deletions
diff --git a/crypto/src/asn1/cryptopro/GOST28147Parameters.cs b/crypto/src/asn1/cryptopro/GOST28147Parameters.cs
index fc0d792d1..9167cd4b5 100644
--- a/crypto/src/asn1/cryptopro/GOST28147Parameters.cs
+++ b/crypto/src/asn1/cryptopro/GOST28147Parameters.cs
@@ -1,5 +1,4 @@
 using System;
-using System.Collections;
 
 using Org.BouncyCastle.Utilities;
 
@@ -11,31 +10,23 @@ namespace Org.BouncyCastle.Asn1.CryptoPro
         private readonly Asn1OctetString iv;
         private readonly DerObjectIdentifier paramSet;
 
-		public static Gost28147Parameters GetInstance(
-            Asn1TaggedObject	obj,
-            bool				explicitly)
+		public static Gost28147Parameters GetInstance(Asn1TaggedObject obj, bool explicitly)
         {
             return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
         }
 
-		public static Gost28147Parameters GetInstance(
-            object obj)
+		public static Gost28147Parameters GetInstance(object obj)
         {
             if (obj == null || obj is Gost28147Parameters)
-            {
                 return (Gost28147Parameters) obj;
-            }
 
-            if (obj is Asn1Sequence)
-            {
-                return new Gost28147Parameters((Asn1Sequence) obj);
-            }
+            if (obj is Asn1Sequence seq)
+                return new Gost28147Parameters(seq);
 
             throw new ArgumentException("Invalid GOST3410Parameter: " + Platform.GetTypeName(obj));
         }
 
-        private Gost28147Parameters(
-            Asn1Sequence seq)
+        private Gost28147Parameters(Asn1Sequence seq)
         {
 			if (seq.Count != 2)
 				throw new ArgumentException("Wrong number of elements in sequence", "seq");