summary refs log tree commit diff
path: root/crypto/src/asn1/x9/X9ECParameters.cs
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2015-11-13 16:55:57 +1100
committerDavid Hook <dgh@cryptoworkshop.com>2015-11-13 16:55:57 +1100
commit044deb08952282ffeffb502279ec18965f672d38 (patch)
tree2e546d0367d687b2f0599929793f8c7c9872d6e9 /crypto/src/asn1/x9/X9ECParameters.cs
parentReview of culture-independent String comparison methods (diff)
downloadBouncyCastle.NET-ed25519-044deb08952282ffeffb502279ec18965f672d38.tar.xz
added GetInstance methods
Diffstat (limited to '')
-rw-r--r--crypto/src/asn1/x9/X9ECParameters.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crypto/src/asn1/x9/X9ECParameters.cs b/crypto/src/asn1/x9/X9ECParameters.cs
index 2b6b14bcb..0fa343768 100644
--- a/crypto/src/asn1/x9/X9ECParameters.cs
+++ b/crypto/src/asn1/x9/X9ECParameters.cs
@@ -20,6 +20,21 @@ namespace Org.BouncyCastle.Asn1.X9
         private BigInteger	h;
         private byte[]		seed;
 
+		public static X9ECParameters GetInstance(Object obj)
+		{
+			if (obj is X9ECParameters)
+			{
+				return (X9ECParameters)obj;
+			}
+
+			if (obj != null)
+			{
+				return new X9ECParameters(Asn1Sequence.GetInstance(obj));
+			}
+
+			return null;
+		}
+
         public X9ECParameters(
             Asn1Sequence seq)
         {