Code example for KeyPairGenerator

Methods: initialize

0
            provider = "AndroidOpenSSL";
        } 
 
        this.generator = KeyPairGenerator.getInstance(generatorAlgorithm, provider);
        this.random = SecureRandom.getInstance("SHA1PRNG");
        this.generator.initialize(1024);
    } 
 
    public void time(int reps) throws Exception {
        for (int i = 0; i < reps; ++i) {
            KeyPair keyPair = generator.generateKeyPair();
        } 
    } 
}