summaryrefslogtreecommitdiffstats
path: root/bcprov/src/main/java/org/bouncycastle/jce/ECGOST3410NamedCurveTable.java
diff options
context:
space:
mode:
authorSergio Giro <sgiro@google.com>2016-02-01 18:54:35 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-02-01 18:54:35 +0000
commit3e75bd6b407dd472c834a50f16aae54cca67ea9c (patch)
treeb5eb091b97b2aade28e5b45a15352125a4a776d7 /bcprov/src/main/java/org/bouncycastle/jce/ECGOST3410NamedCurveTable.java
parent9218edabd1ef9852bc2f13115dcadc81b442dd6c (diff)
parentc1040cb5656c3299f1c2d0fe0bd7c44b10466aaf (diff)
downloadandroid_external_bouncycastle-3e75bd6b407dd472c834a50f16aae54cca67ea9c.tar.gz
android_external_bouncycastle-3e75bd6b407dd472c834a50f16aae54cca67ea9c.tar.bz2
android_external_bouncycastle-3e75bd6b407dd472c834a50f16aae54cca67ea9c.zip
Merge "Restoring the contents of aosp after"
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/jce/ECGOST3410NamedCurveTable.java')
-rw-r--r--bcprov/src/main/java/org/bouncycastle/jce/ECGOST3410NamedCurveTable.java61
1 files changed, 0 insertions, 61 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/jce/ECGOST3410NamedCurveTable.java b/bcprov/src/main/java/org/bouncycastle/jce/ECGOST3410NamedCurveTable.java
deleted file mode 100644
index 7843e0a..0000000
--- a/bcprov/src/main/java/org/bouncycastle/jce/ECGOST3410NamedCurveTable.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.bouncycastle.jce;
-
-import java.util.Enumeration;
-
-import org.bouncycastle.asn1.ASN1ObjectIdentifier;
-import org.bouncycastle.asn1.cryptopro.ECGOST3410NamedCurves;
-import org.bouncycastle.crypto.params.ECDomainParameters;
-import org.bouncycastle.jce.spec.ECNamedCurveParameterSpec;
-
-/**
- * a table of locally supported named curves.
- */
-public class ECGOST3410NamedCurveTable
-{
- /**
- * return a parameter spec 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 a parameter spec for the curve, null if it is not available.
- */
- public static ECNamedCurveParameterSpec getParameterSpec(
- String name)
- {
- ECDomainParameters ecP = ECGOST3410NamedCurves.getByName(name);
- if (ecP == null)
- {
- try
- {
- ecP = ECGOST3410NamedCurves.getByOID(new ASN1ObjectIdentifier(name));
- }
- catch (IllegalArgumentException e)
- {
- return null; // not an oid.
- }
- }
-
- if (ecP == null)
- {
- return null;
- }
-
- return new ECNamedCurveParameterSpec(
- name,
- ecP.getCurve(),
- ecP.getG(),
- ecP.getN(),
- ecP.getH(),
- ecP.getSeed());
- }
-
- /**
- * return an enumeration of the names of the available curves.
- *
- * @return an enumeration of the names of the available curves.
- */
- public static Enumeration getNames()
- {
- return ECGOST3410NamedCurves.getNames();
- }
-}