Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / August 2003

Tip: Looking for answers? Try searching our database.

ID generator

Thread view: 
Saumil - 26 Aug 2003 23:46 GMT
Hi all

I am looking for an ID  or key generator in Java as a class or Pkg.

I need the result to be  mixed with  - digits and letters together.

It has to be fixed size or I have to set the length.

also  it would be good to have a method

to reject offensive words and fragments of words and a method
that look into

a table of already generated keys to insure the new key is unique

Thanks in advance,
David Rabinowitz - 27 Aug 2003 13:56 GMT
Try java.security.SecureRandom

It has a getNextBytes() method in which you specify the number of bytes you
need (getNextInt(), getNextDouble() etc. use it). Then convert then using
base64 for example.

David

> Hi all
>
[quoted text clipped - 15 lines]
> --
> Posted via http://dbforums.com
Saumil - 27 Aug 2003 17:07 GMT
Thanks

Originally posted by David Rabinowitz

> Try java.security.SecureRandom

> It has a getNextBytes() method in which you specify the number of
> bytes you

> need (getNextInt(), getNextDouble() etc. use it). Then convert
> then using

> base64 for example.

> David

> "Saumil" <member37036@dbforums.com> wrote in message

> news:3287866.1061937966@dbforums.com"]news:3287866.1061937966@d-
> bforums.com[/url]...

> > Hi all

> > I am looking for an ID  or key generator in Java as a class or
>     Pkg.

> > I need the result to be  mixed with  - digits and letters
>     together.

> > It has to be fixed size or I have to set the length.

> > also  it would be good to have a method

> > to reject offensive words and fragments of words and a
>     method

> > that look into

> > a table of already generated keys to insure the new key is
>     unique

> > Thanks in advance,

> > --

> Posted via
   http://dbforums.com/http://dbforums.com
   


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.