I want to make a batch file that will convert input text to an encoded message, I don't want to make one that just converts it the numerical value I want it to be able to decode the messages as well. Any ideas?
First you need to think about the kind of encryption you want to use. There are ones that predate computers that involve simple letter-shifts like Caesar's cipher or Vigenére's cipher, which are fairly easy to program. Once you have decided on a method of encryption you can start to decide how exactly to implement it.
I've been thinking that some kind of encryption that will substitute a letter for a number like a=352 or something like that.
so you want to invent your own cipher? I'd recommend using one already invented, as good ones are not very easy to devise as you might think.
Okay, do you have any you would recommend?
I'd recommend the simplest to start off with: the Caesar cipher. http://en.wikipedia.org/wiki/Caesar_cipher Do you plan to write a program to encrypt text? If so, in what language?
yes i want to try to write a program, and I'm using batch files.
Well, I'm afraid I don't work with batch files, so I'm afraid I couldn't help you with syntax or details like that, but essentially you convert each character in a message to it's ascii number, then shift it by some prescribed amount and use modular arithmetic to "wrap around" so that rotating a by 2 becomes c, f to h, and z to b. If you want to leave the ascii numbers as integers and not convert them back to characters that would give you an encrypted message that, though easily deciphered, would look like a jumble of numbers. You could decrypt it by writing another batch file that tries each of the 26 possible shifts in the caesar cipher, converts each integer back to it's ascii character, and see which one gives back a readable message. You could either print out all 26 possibilities and look at them, or use an imported dictionary and another function to count the number of real words produced by each shift to automate the decryption process.
Okay thanks for your help! I've learned a lot!
Happy to help :) If only we were working with C or Python I could be more specific.
No problem, I like messing around with programs, Lol
Join our real-time social learning platform and learn together with your friends!