Code example for DHParameterSpec

Methods: getG, getL, getP

0
            { 
                throw new InvalidAlgorithmParameterException("parameter object not a DHParameterSpec");
            } 
            DHParameterSpec     dhParams = (DHParameterSpec)params;
 
            param = new DHKeyGenerationParameters(random, new DHParameters(dhParams.getP(), dhParams.getG(), null, dhParams.getL()));
 
            engine.init(param);
            initialised = true;
        } 
 
        public KeyPair generateKeyPair()
        { 
            if (!initialised)
            { 
                // BEGIN android-changed 
                Integer paramStrength = Integer.valueOf(strength);
                // END android-changed 
 
                if (params.containsKey(paramStrength))
                {