Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.asn1.nist;
Utility class for fetching curves using their NIST names as published in FIPS-PUB 186-3
public class NISTNamedCurves
    static final Hashtable objIds = new Hashtable();
    static final Hashtable names = new Hashtable();
    static void defineCurve(String nameASN1ObjectIdentifier oid)
    public static X9ECParameters getByName(
        String  name)
        ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier).get(Strings.toUpperCase(name));
        if (oid != null)
            return getByOID(oid);
        return null;

return the X9ECParameters object for the named curve represented by the passed in object identifier. Null if the curve isn't present.

oid an object identifier representing a named curve, if present.
    public static X9ECParameters getByOID(
        ASN1ObjectIdentifier  oid)
        return SECNamedCurves.getByOID(oid);

return the object identifier signified by the passed in name. Null if there is no object identifier associated with name.

the object identifier associated with name, if present.
    public static ASN1ObjectIdentifier getOID(
        String  name)
        return (ASN1ObjectIdentifier).get(Strings.toUpperCase(name));

return the named curve name represented by the given object identifier.
    public static String getName(
        ASN1ObjectIdentifier  oid)
        return (String).get(oid);

returns an enumeration containing the name strings for curves contained in this structure.
    public static Enumeration getNames()
        return .keys();
New to GrepCode? Check out our FAQ X