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(Messages.getString(
                            "security.1A1", e)); //$NON-NLS-1$
        throw new InvalidKeyException(Messages.getString("security.19F")); //$NON-NLS-1$
Stop searching for code, let great code find you!  Add Codota to your java IDE