Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 126493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:19:35+00:00 2026-05-11T05:19:35+00:00

My user have a password field such as 0!ZWQ2 saved in the database. I

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T05:19:36+00:00Added an answer on May 11, 2026 at 5:19 am

    Following is Quick, Fast, and lesser code example to convert.

    Code in C#:

            char[] OriginalChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'.ToCharArray();         char[] ScrambleChars = '9setybcpqwiuvxr108daj5'-`~!@#$%^&()+|}][{:.?/<>,;ZWQ2@#34KDART'.ToCharArray();         string TextToTransfer = 'Hello';         string NewText = '';         foreach (char c in TextToTransfer)         {             NewText = NewText + ScrambleChars[Array.IndexOf<char>(OriginalChars, c)].ToString();         }         Console.WriteLine(NewText); 

    Code in VB:

        Dim OriginalChars() As Char = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'     Dim ScrambleChars() As Char = '9setybcpqwiuvxr108daj5'-`~!@#$%^&()+|}][{:.?/<>,;ZWQ2@#34KDART'     Dim TextToTransfer As String = 'Hello'     Dim NewText As String = ''     For Each c As Char In TextToTransfer         NewText += ScrambleChars(Array.IndexOf(OriginalChars, c))     Next     MsgBox(NewText) 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 85k
  • Answers 85k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You should be able to access the functions inside App_Code… May 11, 2026 at 5:09 pm
  • Editorial Team
    Editorial Team added an answer I think your problem is that it will almost never… May 11, 2026 at 5:09 pm
  • Editorial Team
    Editorial Team added an answer So you want all services except those that have the… May 11, 2026 at 5:09 pm

Related Questions

I want to bounce an idea around. I have been building web services and
I am trying to wrap my head around doing validation in a MVC scenario.
I have a stored procedure which has to get a password from my Users
I'm having a hard time figuring out how Firefox and Chrome determining what fields

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.