Results 1 to 4 of 4

Thread: Simple Text Encryption Capable Of Being Decoded By Hand

  1. #1

    Thread Starter
    Lively Member kshadow22's Avatar
    Join Date
    Dec 2014
    Location
    Kentucky
    Posts
    95

    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.

  2. #2
    Fanatic Member Arve K.'s Avatar
    Join Date
    Sep 2008
    Location
    Kyrksæterøra, Norway
    Posts
    518

    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.
    Last edited by Arve K.; Mar 9th, 2019 at 08:15 PM.
    Arve K.

    Please mark your thread as resolved and add reputation to those who helped you solve your problem
    Disclaimer: I am not a professional programmer

  3. #3

    Thread Starter
    Lively Member kshadow22's Avatar
    Join Date
    Dec 2014
    Location
    Kentucky
    Posts
    95

    Re: Simple Text Encryption Capable Of Being Decoded By Hand

    Quote Originally Posted by Arve K. View Post
    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.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width