Hi
My user have a password field such as “0!ZWQ2” saved in the database. I must unscramble my User input password from “aA1234” to “0!ZWQ2” and compare it to data in a database.
The 2 strings that I compare is:
“abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ” With “9setybcpqwiuvxr108daj5'-`~!@#$%^&()+|}][{:.?/<>,;ZWQ2@#34KDA”
This way a = 9 and 0 = A
How would I do this in C#, any ideas?
I just need to take the password field from the user input and scramble it to funny text to compare it to the data in the Database.
Any help will be appreciated.
Regards Etienne
Updates: (10 Feb 2009) Thanks everyone for the replies. Please note that i do realize that there are much better ways of handeling this. But please note that I am creating an ASP.NET application thats goign to be sitting inside SharePoint connecting to Cobol flat file data and not a proper database. Using Transoft to connect my ASP.NET (ODBC connector) to the Cobol flat files. So i have to stick with this code, and this will not be used on my Private site. I also have no control on when the Password is created in Cobol.