Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Password protection to Midlet in .Jad file

 
leena viswan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one help me to know whether it is possible to provide password protection to MIdlet using .Jad file.
 
Pavel Kubal
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you closer specify your problem.
 
Dave Butler
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's one way of doing it: hash a passcode and store it as a custom attribute in the JAD file. In the MIDlet startup code, get the user to enter the passcode, hash it and compare to the JAD attribute's value. For a secure solution use MD5. And consider avoiding annoying the user by flagging a successful entry of the passcode in an RMS store (and check that flag on subsequent application starts). All of this adds a few KBs to MIDlet's JAR size.

As a suggestion, use numbers for a passcode - users understand the concept of a PIN.


Hope this helps

Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic