Code example for SecureRandom

Methods: setSeed

0
 
	/* 
	 * Class under test for void setSeed(long) 
	 */ 
	public final void testSetSeedlong() { 
		SecureRandom sr = new SecureRandom();
		sr.setSeed(0);
		sr.setSeed(-1);
		sr.setSeed(11111111111L);
	} 
 
	public final void testNextBytes() { 
		SecureRandom sr = new SecureRandom();
		sr.nextBytes(new byte[20]);
		sr.nextBytes(new byte[1]);
		 
		//Not specified behavior: throws NullPointerException if bytes is null 
		try { 
			sr.nextBytes(null);
		} catch (NullPointerException e) {	
Contextual code suggestions in your IDE  Get Codota for Java