@Test public void size() { byte[] password = generator.generate(); assertTrue(password.length > 12); assertTrue(password.length < 64); }
public byte[] generate() { byte[] password = new byte[30]; for (int i = 0; i < password.length; ++i) { int index = random.nextInt(VALID_CHARS.length); password[i] = (byte) VALID_CHARS[index]; } return password; }
PasswordGenerator { public byte[] generate() { byte[] password = new byte[30]; for (int i = 0; i < password.length; ++i) { int index = random.nextInt(VALID_CHARS.length); password[i] = (byte) VALID_CHARS[index]; } return password; } }
PasswordGenerator { public byte[] generate() { byte[] password = new byte[30]; for (int i = 0; i < password.length; ++i) { int index = random.nextInt(VALID_CHARS.length); password[i] = (byte) VALID_CHARS[index]; } return password; }  }
PasswordGenerator { public byte[] generate() { byte[] password = new byte[30]; for (int i = 0; i < password.length; ++i) { int index = random.nextInt(VALID_CHARS.length); password[i] = (byte) VALID_CHARS[index]; } return password; }  byte[] generate(); }
PasswordGenerator { public byte[] generate() { byte[] password = new byte[30]; for (int i = 0; i < password.length; ++i) { int index = random.nextInt(VALID_CHARS.length); password[i] = (byte) VALID_CHARS[index]; } return password; }  byte[] generate();  }