Create a password algorithm based on a username in Flash ActionScript

I am a novice when it comes to Flash or ActionScript.  I have a Flash presentation that I need to password protect based on some sort of algorithm.  This is what I need to accomplish:

1.  The user opens a flash presentation (either through a web page or from a download).
2.  The viewer sees a welcome screen and are prompted to either "login" or "register"
3.  If the user clicks login, it goes to the login page.  If the user clicks register the viewer sees a registration screen.
4.  The viewer will enter their name, address, contact information and email address.
5.  The viewer will click on the submit button.
6.  The viewer will then be instructed to check their email for a password (or ask their administrator). Then asked to click on "login"
7.  The viewer will then enter their email address as their username and their password.
8.  The presentation will launch.

The issue is that I want the flexibility of the flash presentation not having to access a database of usernames and passwords.  In fact, I do not want there to be a need for the viewer to even be on-line (i.e. they may be provided the flash presentation on CD-ROM or other media).

Therefore, the validation for the password should be some sort of algorithm based on the user's email address (user name).  The algorithm should probably trim all characters that are not letters or numbers and base the password on that "trimmed" username.

Can anyone help me?  I would very much appreciate it!  Thank you.

Jon.
JonGouthroAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

quizengineCommented:
A couple of ideas spring to mind. Obfuscation is the key - because you are working some algorithm on the text you don't want anyone to spot the pattern of what you are doing. Here's what I would try.

1.start from the end of the string that they typed in (their email address) and take the last 5 characters. (I'm setting out to create a 5 character password, but you could do it with 6,7,8 or whatever you think a sensible amount)

2. make a new word from that, then reverse the positions of all of the characters.

3. Increment the first character by 1 (that is if it was 'a', make it 'b', if it was 'j', make it 'k'

4. increment the second character by 2 ('b' -> 'd' etc)

5. increment the third character by 3 ('f' -> 'i' etc)

keep repeating this pattern for the length of the word.

This isn't foolproof of course, but your aim is to make it difficult rather than impossible... Even 'pro' level encryption can be broken, you just have to balance the effort you put in encrypting versus the amount of effort the cracker would have to put in to break it.

Hope this helps.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JonGouthroAuthor Commented:
Dear QuizEngine,

Thank you, those are some great ideas about the design of the algorithm.  How would I go about scripting this in Adobe Flash?

Thanks again!
Jon
quizengineCommented:
You will need to get familiar with Flash's string functions as these are the ones that will let you play with a string. Use the help facility within Flash to start finding out, or google 'actionscript string'.
JonGouthroAuthor Commented:
Although quizengine had good comments, he did not answer the question which was more to do with how to go about coding this in Action Script.  

Thank you for your comments (I really do appreciate your input)  but sorry, I don't think the points are deserved.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.