FileDocCategorySizeDatePackage
X962NamedCurves.javaAPI DocAzureus 3.0.3.48478Wed Apr 12 09:32:16 BST 2006org.bouncycastle.asn1.x9

X962NamedCurves

public class X962NamedCurves extends Object
table of the current named curves defined in X.962 EC-DSA.

Fields Summary
static final org.bouncycastle.math.ec.ECCurve
cFp192v1
static final X9ECParameters
prime192v1
static final org.bouncycastle.math.ec.ECCurve
cFp192v2
static final X9ECParameters
prime192v2
static final org.bouncycastle.math.ec.ECCurve
cFp192v3
static final X9ECParameters
prime192v3
static final org.bouncycastle.math.ec.ECCurve
cFp239v1
static final X9ECParameters
prime239v1
static final org.bouncycastle.math.ec.ECCurve
cFp239v2
static final X9ECParameters
prime239v2
static final org.bouncycastle.math.ec.ECCurve
cFp239v3
static final X9ECParameters
prime239v3
static final org.bouncycastle.math.ec.ECCurve
cFp256v1
static final X9ECParameters
prime256v1
static final Hashtable
objIds
static final Hashtable
curves
static final Hashtable
names
Constructors Summary
Methods Summary
public static X9ECParametersgetByName(java.lang.String name)


    
    
        objIds.put("prime192v1", X9ObjectIdentifiers.prime192v1);       
        objIds.put("prime192v2", X9ObjectIdentifiers.prime192v2);       
        objIds.put("prime192v3", X9ObjectIdentifiers.prime192v3);       
        objIds.put("prime239v1", X9ObjectIdentifiers.prime239v1);       
        objIds.put("prime239v2", X9ObjectIdentifiers.prime239v2);       
        objIds.put("prime239v3", X9ObjectIdentifiers.prime239v3);       
        objIds.put("prime256v1", X9ObjectIdentifiers.prime256v1);       

        names.put(X9ObjectIdentifiers.prime192v1, "prime192v1");       
        names.put(X9ObjectIdentifiers.prime192v2, "prime192v2");       
        names.put(X9ObjectIdentifiers.prime192v3, "prime192v3");       
        names.put(X9ObjectIdentifiers.prime239v1, "prime239v1");       
        names.put(X9ObjectIdentifiers.prime239v2, "prime239v2");       
        names.put(X9ObjectIdentifiers.prime239v3, "prime239v3");       
        names.put(X9ObjectIdentifiers.prime256v1, "prime256v1");       

        curves.put(X9ObjectIdentifiers.prime192v1, prime192v1);       
        curves.put(X9ObjectIdentifiers.prime192v2, prime192v2);       
        curves.put(X9ObjectIdentifiers.prime192v3, prime192v3);       
        curves.put(X9ObjectIdentifiers.prime239v1, prime239v1);       
        curves.put(X9ObjectIdentifiers.prime239v2, prime239v2);       
        curves.put(X9ObjectIdentifiers.prime239v3, prime239v3);       
        curves.put(X9ObjectIdentifiers.prime256v1, prime256v1);       
    
        DERObjectIdentifier oid = (DERObjectIdentifier)objIds.get(name);

        if (oid != null)
        {
            return (X9ECParameters)curves.get(oid);
        }

        return null;
    
public static X9ECParametersgetByOID(org.bouncycastle.asn1.DERObjectIdentifier oid)
return the X9ECParameters object for the named curve represented by the passed in object identifier. Null if the curve isn't present.

param
oid an object identifier representing a named curve, if present.

        return (X9ECParameters)curves.get(oid);
    
public static java.lang.StringgetName(org.bouncycastle.asn1.DERObjectIdentifier oid)
return the named curve name represented by the given object identifier.

        return (String)names.get(oid);
    
public static java.util.EnumerationgetNames()
returns an enumeration containing the name strings for curves contained in this structure.

        return objIds.keys();
    
public static org.bouncycastle.asn1.DERObjectIdentifiergetOID(java.lang.String name)
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.

        return (DERObjectIdentifier)objIds.get(name);