Code example for DSAParams

Methods: getG, getP, getQ

0
 
                    y = publicKey.getY();
 
                    DSAParams params = publicKey.getParams();
 
                    p = params.getP();
                    q = params.getQ();
                    g = params.getG();
 
                    return (T) (new DSAPublicKeySpec(y, p, q, g));
                } 
 
                if (keySpec.equals(X509EncodedKeySpec.class)) {
                    return (T) (new X509EncodedKeySpec(key.getEncoded()));
                } 
 
                throw new InvalidKeySpecException(Messages
                        .getString("security.19D")); //$NON-NLS-1$ 
            } 
        } 
        throw new InvalidKeySpecException(Messages.getString("security.19F")); //$NON-NLS-1$