public static X9ECParameters getByName( String name) { ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)objIds.get(Strings.toLowerCase(name)); if (oid != null) { return getByOID(oid); } return null; }
@Override protected Set<String> getEnums() { Set<String> curveNames = new HashSet<>(); Enumeration<?> names = X962NamedCurves.getNames(); while (names.hasMoreElements()) { curveNames.add((String) names.nextElement()); } names = SECNamedCurves.getNames(); while (names.hasMoreElements()) { curveNames.add((String) names.nextElement()); } names = TeleTrusTNamedCurves.getNames(); while (names.hasMoreElements()) { curveNames.add((String) names.nextElement()); } names = NISTNamedCurves.getNames(); while (names.hasMoreElements()) { curveNames.add((String) names.nextElement()); } return curveNames; }
public static ASN1ObjectIdentifier getOID(short curvesize, boolean twisted) { return getOID("brainpoolP" + curvesize + (twisted ? "t" : "r") + "1"); } }
public static String getCurveName(final ASN1ObjectIdentifier curveOid) { ParamUtil.requireNonNull("curveOid", curveOid); String curveName = X962NamedCurves.getName(curveOid); if (curveName == null) { curveName = SECNamedCurves.getName(curveOid); } if (curveName == null) { curveName = TeleTrusTNamedCurves.getName(curveOid); } if (curveName == null) { curveName = NISTNamedCurves.getName(curveOid); } return curveName; }
/** * 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; }
name = TeleTrusTNamedCurves.getName(oid);
ecP = TeleTrusTNamedCurves.getByName(name);
public static X9ECParameters getByName( String name) { ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)objIds.get(Strings.toLowerCase(name)); if (oid != null) { return getByOID(oid); } return null; }
/** * Return the list of all curve names for this set. * * @return The named curves that belong to this set */ @SuppressWarnings("unchecked") public List<String> getAllCurveNames() { Enumeration<String> en = null; switch (this) { case ANSI_X9_62: en = X962NamedCurves.getNames(); break; case TELETRUST: en = TeleTrusTNamedCurves.getNames(); break; case NIST: en = NISTNamedCurves.getNames(); break; case SEC: en = SECNamedCurves.getNames(); break; } if (en == null) { return new ArrayList<>(); } return Collections.list(en); }
public static ASN1ObjectIdentifier getOID(short curvesize, boolean twisted) { return getOID("brainpoolP" + curvesize + (twisted ? "t" : "r") + "1"); } }
/** * 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(); }
/** * return the object identifier signified by the passed in name. Null * if there is no object identifier associated with name. * * @return the object identifier associated with name, if present. */ public static ASN1ObjectIdentifier getOID( String name) { ASN1ObjectIdentifier oid = X962NamedCurves.getOID(name); if (oid == null) { oid = SECNamedCurves.getOID(name); } if (oid == null) { oid = TeleTrusTNamedCurves.getOID(name); } if (oid == null) { oid = NISTNamedCurves.getOID(name); } return oid; }
ecP = TeleTrusTNamedCurves.getByOID(oid);
/** * 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()); addEnumeration(v, ANSSINamedCurves.getNames()); addEnumeration(v, ECGOST3410NamedCurves.getNames()); addEnumeration(v, GMNamedCurves.getNames()); return v.elements(); }
oid = TeleTrusTNamedCurves.getOID(name);
ecP = TeleTrusTNamedCurves.getByOID(oid);
ecP = TeleTrusTNamedCurves.getByOID(oid);
ecP = TeleTrusTNamedCurves.getByOID(oid);