Simple Text Encryption Capable Of Being Decoded By Hand
So I am working on a program intended to demonstrate a very simple way of encrypting any text. My goal is for it to work in a way (for example) that A= 32dc9w B= wwkjn21 C=32kjnd#4 and so on... so when a user types in ABC and click the button (labeled encrypt), there output is "32dc9wwwkjn2132kjnd#4".
I need to be able to do this pretty much with all upper case letters, lower case letters, numbers, and the symbols that follow the numbers.
I have thought of using the find and replace method, but it does not work the way I want it to. Instead, the program will continue encrypting forever and goes into a runtime error. I can think of very long and complex ways to do this, but I am guessing I am not the first one to attempt this project. I search the forum, but failed to find anything closely related to this.
Any code demonstrations, examples, and / or tips would be very appreciated. Thank you.
Re: Simple Text Encryption Capable Of Being Decoded By Hand
Why re-invent the wheel?
.Net is already capable of encrypting/decrypting.
Edit:
Or I might have misunderstood the topic. In that case, you should create some kind of table and map each character to a certain string of... gibberish. When the user enters a character, you would loop through the table to find the "encrypted" string that is mapped to that character.
Re: Simple Text Encryption Capable Of Being Decoded By Hand
Quote:
Originally Posted by
Arve K.
Why re-invent the wheel?
.Net is already capable of
encrypting/decrypting.
Edit:
Or I might have misunderstood the topic. In that case, you should create some kind of table and map each character to a certain string of... gibberish. When the user enters a character, you would loop through the table to find the "encrypted" string that is mapped to that character.
Right, that is my goal. It is easy for me to put into words, however, getting it to code has been difficult and more so trying to get it to give me the right output.
Re: Simple Text Encryption Capable Of Being Decoded By Hand
What would be the steps you would perform to do this manually? Those are the same steps that your code needs to perform. If you don't have a clear idea of those steps in your head or, even better, written down then it should be no surprise that writing code to perform them is difficult. Develop an algorithm first, which has nothing to do with programming, and then write code to implement the algorithm.