Code example for InvalidKeyException

0
            return new ECPrivateKeyParameters( 
                            k.getD(),
                            new ECDomainParameters(s.getCurve(), s.getG(), s.getN(), s.getH(), s.getSeed()));
        } 
                         
        throw new InvalidKeyException("can't identify EC private key.");
    } 
 
    public static DERObjectIdentifier getNamedCurveOid( 
        String name)
    { 
        DERObjectIdentifier oid = X962NamedCurves.getOID(name);
         
        if (oid == null)
        { 
            oid = SECNamedCurves.getOID(name);
            if (oid == null)
            { 
                oid = NISTNamedCurves.getOID(name);
            }