Ostermillerutil Java Utilities Random Password Generator - com.Ostermiller.util Java Utilities

Generate random passwords of arbitrary length and arbitrary alphabet.


// Get an eight character password 
// made up of the letters A, B, and C.
	new RandPass(new char[]{'A','B','C'}).getPass(8)

You could use the command line:
java com.ostermiller.util.RandPass
to generate a random password from the command line. You may also run this program as an applet in your web browser

A cryptographically secure pseudo-random number generator is used to generate the passwords. Limitations an passwords such as the length, required characters, or amount of repetition may be used.

To run the program use the following command line:
java -classpath utils.jar com.Ostermiller.util.RandPass

RandPass [-anFLrlRv]
Generate secure random passwords.
  --help               Print this help message.
  --version            Print out the version number.
  --about              Print out license and contact info.
  -a --alphabet chars  String of characters to use in password.
  -n --number num      Number of passwords to generate.
  -F --first chars     Characters that may be used for first character.
  -L --last chars      Characters that may be used for last character.
  -l --length num      Password length.
  -r --reps num        Maximum chars that may be repeated.
  -R --require chars   Require a character from given alphabet be present.
  -v --verify class    Java subclass of PasswordVerifier to use.


OstermillerUtil Java Utilities Copyright (c) 2001-2020 by Stephen Ostermiller and other contributors

The OstermillerUtils library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

License FAQs - Why GPL? How about the LGPL or something else?