Code example for DSAPrivateKey

Methods: getParamsgetX

0
        } 
        else if (spec.isAssignableFrom(DSAPrivateKeySpec.class) && key instanceof java.security.interfaces.DSAPrivateKey)
        { 
            java.security.interfaces.DSAPrivateKey k = (java.security.interfaces.DSAPrivateKey)key;
 
            return new DSAPrivateKeySpec(k.getX(), k.getParams().getP(), k.getParams().getQ(), k.getParams().getG());
        } 
 
        return super.engineGetKeySpec(key, spec);
    } 
 
    protected Key engineTranslateKey(
        Key key)
        throws InvalidKeyException 
    { 
        if (key instanceof DSAPublicKey)
        { 
            return new BCDSAPublicKey((DSAPublicKey)key);
        } 
        else if (key instanceof DSAPrivateKey)