PDA

View Full Version : Add Username/Password verification to Application on pageShow (and store values)



mystica
07-29-2009, 03:40 PM
I've noticed there's a fair few samples around on how to set a password-protection to your app, but there seems to be bit of a lack when it comes to examples that:

- give the user the option to set a password/username on actual pageShow
- store the values somewhere (ie. registry or ini-file)
- and then retrieve values for verification of entry, beyond the initial verification-input on pageShow.

So I had a go at this myself. The result seems to work ... but I wouldn't mind if one the more savy members could run a check on this sample for missed logic.

Note:
It'd be even better if someone could actually convert this sample into something with encrypted password/username storage ... maybe using Crypto.Blowfish to the registry or something? This has been a head-banging exercise in logic for me, so I'd really appreciate any improvements, to my design, yeh?

mwreyf1
07-29-2009, 03:59 PM
That has already been done.

Use this code to get your app working.

I can't remember where this came from.

mystica
07-29-2009, 04:00 PM
Woops ... seems I missed the time limit on the editing-window. Here is the apz-attachment (with screenshots):

mystica
07-29-2009, 04:08 PM
Hey thanks, mwreyf1 ... haven't seen this one. Should make life easier. Encryption and everything ... cool bananas!