Code example for SecureRandom

Methods: nextInt

			this.random = SecureRandom.getInstance(PRNG_ALGORITHM, PRNG_PROVIDER);
		} catch (GeneralSecurityException e) {
			throw new IllegalStateException(e);
		}"Seeding PRNG"); 
		random.nextInt(); // force seeding
		// update the PRNG every hour, starting in an hour 
		pool.scheduleAtFixedRate(new UpdateTask(random, LOGGER), 1, 1, TimeUnit.HOURS);
	public SecureRandom get() {
		return random;
Stop searching for code, let great code find you!  Add Codota to your java IDE