Password Generation in Java

| 6 Comments

Like my previous entry, this is the Password Generator again, but this time it's written in Java. It's is roughly the same PasswordGenerator class, but with the Java twist applied. I thought this would be a good illustration to show some of the similarities and differences of Java and ActionScript.

One of the biggest differences is trying to create the array of function references. You'll see that I had to make an interface and wrapper classes to make the generatePassword method look roughly the same as it's ActionScript equivalent. Additionally, I made use of Java's exceptions to make the PasswordGenerator class a little more robust.

There isn't a robust UI for this one - just the Java class and a Test class to show example usage. This probably isn't the "final" version of this Java class either. I'll probably continue to build on it, and eventually I'd like to release a GUI for it as well.. but again, there's only so much time in a day.

Download the Java implementation of my PasswordGenerator class here.

Note that you can use createObject in ColdFusion to use this Java class in your ColdFusion web apps, if you want.

And yes, you guessed it, a C# version will be coming on Sunday.

6 Comments

ur algorithm is very effective and helpful..

Clean simple, effecient. Nice work

Very clean and efficient written code. Keep up the good work.

usefull & easy -> perfect

Very useful and clean code. I do appreciate it.

I am using your PasswordGenerator class. Very nice. Thanks!

Leave a comment



About this Entry

This page contains a single entry by darron published on August 22, 2003 11:43 AM.

Password Generation in Flash MX was the previous entry in this blog.

Password Generation in C# is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Archives

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.02