All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.Ostermiller.util.RandPass.bte Maven / Gradle / Ivy

Go to download

Open source (GPL) Java utilities maintained by Stephen Ostermiller with help from many contributors.

The newest version!
<%bte.doc super="item.bte" %>
<%bte.tpl name=pageTitle%>Random Password Generator<%/bte.tpl%>
<%bte.tpl name=description%>Java library to generate a random String using a cryptographically secure random number generator.<%/bte.tpl%>
<%bte.tpl name=keywords%>random password java library, java library for passwords, password library for java, secure password library<%/bte.tpl%>
<%bte.tpl name=topcontent%>

Generate random passwords of arbitrary length and arbitrary alphabet.

<%/bte.tpl%> <%bte.tpl name=content%>

Example

// Get an eight character password 
// made up of the letters A, B, and C.
System.out.println(
	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.
<%/bte.tpl%> <%bte.tpl name=linkRandPass%>Random Password Generator <%/bte.tpl%> <%/bte.doc%>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy