Random password generation





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

6
Date Submitted Fri. Feb. 17th, 2006 8:54 AM
Revision 1
Scripter TimYates
Tags Java
Comments 1 comments
More often than not, if your trying to work out what's going wrong with your subclass of InputStream, why the character encoding is getting lost in your database, or your file format reader is failing, you'll need to dump a byte buffer out in a useable form.

Here's two methods, one which appends to a StringBuffer, one which simply prints out to System.out

Tim.

(NB: The line: sb.append( "n" ) ; SHOULD have a leading slash ie: sb.append( "\n" ) ; but the formatter seems to remove it...
7
Date Submitted Tue. Feb. 21st, 2006 11:47 AM
Revision 1
Coder mattrmiller
Tags Java | Timer
Comments 1 comments
A simple implementation of a Java timer. Executes timer task every second.
7
Date Submitted Wed. Feb. 22nd, 2006 12:58 AM
Revision 1
Coder mattrmiller
Tags Compare | Date | Java
Comments 2 comments
Compare two dates in Java.
-3
Date Submitted Thu. Feb. 23rd, 2006 9:57 AM
Revision 3
Helper jpinkham
Tags Java | JDBC | lightweight | orm | SQL
Comments 1 comments
I actually like SQL. So, things like Hibernate with it's own query language don't quite fit my style. But, I don't want to code the same catch SQLException conn.close over and over either. So, I came up with this.

The idea is you extend SQLCommand (usually anonymously) override getSql(), and call execute() to get a list of whatever objects you are selecting - all the cleanup stuff is taken care of. It also handles nullable attributes more intuitively using ResultSetWrapper and PreparedStatementWrapper so that in your overridden getRow(ResultSetWrapper rs) method, you can call getInt on a nullable column and have it return null - what a concept! Also I like java.util.Date for my dates, so the wrappers convert to/from java.sql.Timestamp.

Right now I've only bothered with some basic types - it should be pretty clear how to add more if you need em.

See what ya'll think.

Oh, it uses JDK 1.5 Generics, but stripping that away would be pretty easy if you wanted 1.2 compliance.
8
Date Submitted Thu. Feb. 23rd, 2006 1:10 PM
Revision 1
Coder mattrmiller
Tags Bits | Bytes | Constants | Java
Comments 0 comments
I needed these for a recent project, bits and bytes constants.
8
Date Submitted Fri. Feb. 24th, 2006 8:18 PM
Revision 2
Coder mattrmiller
Tags Java | JPasswordField | Password | String
Comments 2 comments
Convert a password returned by JPasswordField::getPassword() into a String.
9
Date Submitted Thu. Mar. 2nd, 2006 2:08 AM
Revision 1
Beginner depsypher
Tags Java
Comments 0 comments
A utility class that gets the MD5 hash of an input stream. Also includes a method for converting byte array to hex-formatted string.
8
Date Submitted Thu. Mar. 2nd, 2006 2:28 AM
Revision 1
Beginner depsypher
Tags Java
Comments 0 comments
Read a eight bytes in little endian order from the given InputStream and create a long out of them.
-5
Date Submitted Thu. Mar. 2nd, 2006 10:56 AM
Revision 1
Syntax Master dannyboy
Tags Password | VBSCRIPT
Comments 1 comments
Create a random password:


usage: CreatePasswd( 8,True,False)
-4
Date Submitted Thu. Mar. 2nd, 2006 11:02 AM
Revision 1
Syntax Master dannyboy
Tags Password | VBSCRIPT
Comments 1 comments
Usage: cscript //nologo RandPass.vbs [password_length]|[?] [complexity] [uniqueness]

This script will generate a random password of X length. It will build the password from seed 'strings of increasing complexity.
1 - simple is the lower case alphabet, numbers 2-9 and !@#$%^&*() all randomly interspersed.
2 - complex is the same as the previous with the addition of UPPER case letters.
3 - insane is the same as the previous with the additional symbols of ,./?>;'[]}{\|~`:
The numbers 0 and 1 have been removed to avoid confusion with the letters O and L.

password_length should be a number between 4 and 127, although a limit of 14 is recommended for Win9x clients. Default is 7
complexity must be 1,2 or 3
uniqueness value of 0 will make each password character unique. A value of 1 [default] will allow repeated characters.

If you don't pass values at the command prompt, you will be prompted for each value.