aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/spongycastle/core/src/main/java/org/spongycastle/asn1/x9/ECNamedCurveTable.java
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/spongycastle/core/src/main/java/org/spongycastle/asn1/x9/ECNamedCurveTable.java')
-rw-r--r--libraries/spongycastle/core/src/main/java/org/spongycastle/asn1/x9/ECNamedCurveTable.java99
1 files changed, 0 insertions, 99 deletions
diff --git a/libraries/spongycastle/core/src/main/java/org/spongycastle/asn1/x9/ECNamedCurveTable.java b/libraries/spongycastle/core/src/main/java/org/spongycastle/asn1/x9/ECNamedCurveTable.java
deleted file mode 100644
index e60629d9d..000000000
--- a/libraries/spongycastle/core/src/main/java/org/spongycastle/asn1/x9/ECNamedCurveTable.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.spongycastle.asn1.x9;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-import org.spongycastle.asn1.ASN1ObjectIdentifier;
-import org.spongycastle.asn1.nist.NISTNamedCurves;
-import org.spongycastle.asn1.sec.SECNamedCurves;
-import org.spongycastle.asn1.teletrust.TeleTrusTNamedCurves;
-
-/**
- * A general class that reads all X9.62 style EC curve tables.
- */
-public class ECNamedCurveTable
-{
- /**
- * return a X9ECParameters object representing the passed in named
- * curve. The routine returns null if the curve is not present.
- *
- * @param name the name of the curve requested
- * @return an X9ECParameters object or null if the curve is not available.
- */
- public static X9ECParameters getByName(
- String name)
- {
- X9ECParameters ecP = X962NamedCurves.getByName(name);
-
- if (ecP == null)
- {
- ecP = SECNamedCurves.getByName(name);
- }
-
- if (ecP == null)
- {
- ecP = TeleTrusTNamedCurves.getByName(name);
- }
-
- if (ecP == null)
- {
- ecP = NISTNamedCurves.getByName(name);
- }
-
- return ecP;
- }
-
- /**
- * return a X9ECParameters object representing the passed in named
- * curve.
- *
- * @param oid the object id of the curve requested
- * @return an X9ECParameters object or null if the curve is not available.
- */
- public static X9ECParameters getByOID(
- ASN1ObjectIdentifier oid)
- {
- X9ECParameters ecP = X962NamedCurves.getByOID(oid);
-
- if (ecP == null)
- {
- ecP = SECNamedCurves.getByOID(oid);
- }
-
- if (ecP == null)
- {
- ecP = TeleTrusTNamedCurves.getByOID(oid);
- }
-
- // NOTE: All the NIST curves are currently from SEC, so no point in redundant OID lookup
-
- return ecP;
- }
-
- /**
- * return an enumeration of the names of the available curves.
- *
- * @return an enumeration of the names of the available curves.
- */
- public static Enumeration getNames()
- {
- Vector v = new Vector();
-
- addEnumeration(v, X962NamedCurves.getNames());
- addEnumeration(v, SECNamedCurves.getNames());
- addEnumeration(v, NISTNamedCurves.getNames());
- addEnumeration(v, TeleTrusTNamedCurves.getNames());
-
- return v.elements();
- }
-
- private static void addEnumeration(
- Vector v,
- Enumeration e)
- {
- while (e.hasMoreElements())
- {
- v.addElement(e.nextElement());
- }
- }
-}