Code example for SecureRandom

Methods: nextInt

0
		} 
		*/ 
		 
		String passwordValue = "123";
		 
		SecureRandom secureRandom = new SecureRandom();
		Integer secureInteger = new Integer( secureRandom.nextInt());
		String digest = MD5.getMD5AsBase64( secureInteger.toString() );
		 
		// crypt the hash with the password from user input 
		DesEncrypter encrypter = new DesEncrypter(digest);
		String cryptedDocumentPass = encrypter.encrypt( digest );
		 
		System.out.println("userpassword=" + MD5.getMD5AsBase64(passwordValue));
		System.out.println("docpassword=" + cryptedDocumentPass);
		 
	} 
}