Code example for DSAPublicKey

Methods: getParamsgetY

            if (key instanceof DSAPublicKey) {
                DSAPublicKey publicKey = (DSAPublicKey) key;
                DSAParams params = publicKey.getParams();
                try { 
                    return engineGeneratePublic(new DSAPublicKeySpec(publicKey
                            .getY(), params.getP(), params.getQ(), params
                } catch (InvalidKeySpecException e) {
                    // Actually this exception shouldn't be thrown 
                    throw new InvalidKeyException("ATTENTION: InvalidKeySpecException: " + e);
        throw new InvalidKeyException("'key' is neither DSAPublicKey nor DSAPrivateKey");
Connect your IDE to all the code out there  Get Codota for Java