Code example for ECPrivateKey

Methods: getParams, getS

0
       } 
       else if (spec.isAssignableFrom(java.security.spec.ECPrivateKeySpec.class) && key instanceof ECPrivateKey)
       { 
           ECPrivateKey k = (ECPrivateKey)key;
 
           if (k.getParams() != null)
           { 
               return new java.security.spec.ECPrivateKeySpec(k.getS(), k.getParams());
           } 
           else 
           { 
               ECParameterSpec implicitSpec = ProviderUtil.getEcImplicitlyCa();
 
               return new java.security.spec.ECPrivateKeySpec(k.getS(), EC5Util.convertSpec(EC5Util.convertCurve(implicitSpec.getCurve(), implicitSpec.getSeed()), implicitSpec)); 
           } 
       } 
 
       throw new RuntimeException("not implemented yet " + key + " " + spec);
    } 
 
    protected PrivateKey engineGeneratePrivate(