Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Key Generator

843811Jul 22 2003 — edited Jul 23 2003
Hey... Pretty much a rookie jave programmer wanting some advice. Never touched java security in my life.

I just built a java program and I want to be able to limit how long people can use it for. I was thinking about making something along the lines of one of those key generators you sometimes see for software cracks (I mean I've only heard about them... ahem... stealing is bad)

I would like it so that every 6 months or so, the software would expire, and they would have to call me up to get a new key or licence.

My plan (dont laugh if it's stupid) was just to make like a string of say size 25, based on {user name, system date, etc...} and then just do a bunch of random arithmetic to generate the (not so) random values... Say for instance
(3rd index + 7th index == 15)
   (12th index == 'H' or 'J')
      ...
Seems like too much work... So now I got this nifty new java book showing me some of the security features of java; and now I am wondering if there is an easier way... Not sure where I should start though.... The public/private key doesnt seem to be what I want - and there is no good example of the KeyGenerator class. That seems to be the one I want?

Is there some pre-built key gens out there I can use. If so - how do I get my prog to realize its a valid key?



Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2003
Added on Jul 22 2003
5 comments
118 views