public static string GetName(DerObjectIdentifier oid) { string name = X962NamedCurves.GetName(oid); if (name == null) { name = SecNamedCurves.GetName(oid); } if (name == null) { name = NistNamedCurves.GetName(oid); } if (name == null) { name = TeleTrusTNamedCurves.GetName(oid); } if (name == null) { name = AnssiNamedCurves.GetName(oid); } return(name); }
/** * 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(DerObjectIdentifier oid) { X9ECParameters ecP = X962NamedCurves.GetByOid(oid); if (ecP == null) { ecP = SecNamedCurves.GetByOid(oid); } // NOTE: All the NIST curves are currently from SEC, so no point in redundant OID lookup if (ecP == null) { ecP = TeleTrusTNamedCurves.GetByOid(oid); } if (ecP == null) { ecP = AnssiNamedCurves.GetByOid(oid); } return(ecP); }