Code example for Hashtable

Methods: containsKey, put

0
            { 
                // BEGIN android-changed 
                Integer paramStrength = Integer.valueOf(strength);
                // END android-changed 
 
                if (params.containsKey(paramStrength))
                { 
                    param = (DHKeyGenerationParameters)params.get(paramStrength);
                } 
                else 
                { 
                    DHParametersGenerator   pGen = new DHParametersGenerator();
 
                    pGen.init(strength, certainty, random);
 
                    param = new DHKeyGenerationParameters(random, pGen.generateParameters());
 
                    params.put(paramStrength, param);
                } 
 
                engine.init(param);
 
                initialised = true;