Code example for SecureRandom

        ECKeyGenerationParameters   param;
        ECKeyPairGenerator          engine = new ECKeyPairGenerator();
        Object                      ecParams = null;
        int                         strength = 239;
        int                         certainty = 50;
        SecureRandom                random = new SecureRandom();
        boolean                     initialised = false;
        String                      algorithm;
        static private Hashtable    ecParameters;
        static { 
            ecParameters = new Hashtable();
            // BEGIN android-changed 
            ecParameters.put(Integer.valueOf(192), new ECGenParameterSpec("prime192v1")); // a.k.a P-192
            ecParameters.put(Integer.valueOf(239), new ECGenParameterSpec("prime239v1"));
            ecParameters.put(Integer.valueOf(256), new ECGenParameterSpec("prime256v1")); // a.k.a P-256
            ecParameters.put(Integer.valueOf(224), new ECGenParameterSpec("P-224"));
Connect your IDE to all the code out there  Get Codota for Java