📄 randpass.bte
字号:
<%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, rand, pass, password, passwords, generate, generator, generater, secure, securely, securly, string, strings, char, chars, array, alphabet, alphabets<%/bte.tpl%><%bte.tpl name=content%><div class=examplecode><h3>Example</h3><pre><span class=comment>// Get an eight character password // made up of the letters A, B, and C.</span><span class=identifier>System</span><span class=separator>.</span><span class=identifier>out</span><span class=separator>.</span><span class=identifier>println</span><span class=separator>( </span><span class=reservedWord>new </span><span class=identifier>RandPass</span><span class=separator>(</span><span class=reservedWord>new char</span><span class=separator>[]{</span><span class=literal>'A'</span><span class=separator>,</span><span class=literal>'B'</span><span class=separator>,</span><span class=literal>'C'</span><span class=separator>}).</span><span class=identifier>getPass</span><span class=separator>(</span><span class=literal>8</span><span class=separator>));</span></pre></div><p>Generate random passwords of arbitrary length and arbitrary alphabet.</p> <p>You could use the command line:<br><b>java com.ostermiller.util.RandPass</b><br>to generate a random password from the command line. You may also <a href="RandPassApplet.html">run this program as an applet</a> in your web browser</p><p>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.</p><br clear=all><div class=programinstructions><p>To run the program use the following command line:<br><b>java -classpath utils.jar com.Ostermiller.util.RandPass</b></p><pre>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.</pre></div><p>[<a href="./#download">Download /w Source</a> |<a href="http://www.gjt.org/servlets/JCVSlet/log/gjt/com/Ostermiller/util/RandPass.java/0">Version History</a> |<a href="RandPass.java.html">Browse Source</a> |<a href="doc/com/Ostermiller/util/RandPass.html">Documentation</a>]</p><%/bte.tpl%><%/bte.doc%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -