Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- System.out.println(pw(100));
- }
- private static final Random random = new java.security.SecureRandom();
- private static char[] chars = "01234567879qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM".toCharArray();
- private static String pw(int min, int max) {
- return new String(IntStream.range(0,random.nextInt(Math.abs(min-max))).map(i -> chars[random.nextInt(chars.length)]).toArray(),0,len);
- }
Add Comment
Please, Sign In to add comment