Remove Obsolete methods
1 files changed, 14 insertions, 33 deletions
diff --git a/crypto/src/asn1/cryptopro/ECGOST3410NamedCurves.cs b/crypto/src/asn1/cryptopro/ECGOST3410NamedCurves.cs
index 99fb34bf7..1e54cb7d1 100644
--- a/crypto/src/asn1/cryptopro/ECGOST3410NamedCurves.cs
+++ b/crypto/src/asn1/cryptopro/ECGOST3410NamedCurves.cs
@@ -223,16 +223,10 @@ namespace Org.BouncyCastle.Asn1.CryptoPro
names[RosstandartObjectIdentifiers.id_tc26_gost_3410_12_512_paramSetC] = "Tc26-Gost-3410-12-512-paramSetC";
}
- /**
- * return the ECDomainParameters object for the given OID, null if it
- * isn't present.
- *
- * @param oid an object identifier representing a named parameters, if present.
- */
- [Obsolete("Use 'GetByOidX9' instead")]
- public static ECDomainParameters GetByOid(DerObjectIdentifier oid)
+ public static X9ECParameters GetByNameX9(string name)
{
- return (ECDomainParameters)parameters[oid];
+ DerObjectIdentifier oid = (DerObjectIdentifier)objIds[name];
+ return oid == null ? null : GetByOidX9(oid);
}
public static X9ECParameters GetByOidX9(DerObjectIdentifier oid)
@@ -241,41 +235,28 @@ namespace Org.BouncyCastle.Asn1.CryptoPro
return ec == null ? null : new X9ECParameters(ec.Curve, new X9ECPoint(ec.G, false), ec.N, ec.H, ec.GetSeed());
}
- /**
- * returns an enumeration containing the name strings for curves
- * contained in this structure.
- */
- public static IEnumerable Names
- {
- get { return new EnumerableProxy(names.Values); }
- }
-
- [Obsolete("Use 'GetByNameX9' instead")]
- public static ECDomainParameters GetByName(string name)
- {
- DerObjectIdentifier oid = (DerObjectIdentifier)objIds[name];
- return oid == null ? null : (ECDomainParameters)parameters[oid];
- }
-
- public static X9ECParameters GetByNameX9(string name)
+ public static DerObjectIdentifier GetOid(
+ string name)
{
- DerObjectIdentifier oid = (DerObjectIdentifier)objIds[name];
- return oid == null ? null : GetByOidX9(oid);
+ return (DerObjectIdentifier)objIds[name];
}
/**
- * return the named curve name represented by the given object identifier.
- */
+ * return the named curve name represented by the given object identifier.
+ */
public static string GetName(
DerObjectIdentifier oid)
{
return (string)names[oid];
}
- public static DerObjectIdentifier GetOid(
- string name)
+ /**
+ * returns an enumeration containing the name strings for curves
+ * contained in this structure.
+ */
+ public static IEnumerable Names
{
- return (DerObjectIdentifier)objIds[name];
+ get { return new EnumerableProxy(names.Values); }
}
}
}
|