October 4th, 2008, 05:19 PM
How to make a program that make text into other text (better explanation in thread)
I don't know where to put this thread but i hope its okay if its the wrong place.
Do you know how you can make a little program, where you can type in a text and then like. Press Convert, and it makes a new text.
I type in: Hello
I press convert
And each letter have a new "combination" so the h is .. 0g5f or something, so the new text says 0g5f5d4s5f6w5f6f0t5e as the new text, so you can write to your friends, and no one else gets what your saying.
So do you know an easy program to make it in, and how it could be made?
October 4th, 2008, 06:39 PM
This sort of a program is pretty common actually. If you set aside the notion of a program for a moment, and ask the following question:
How can you convert text into another text in such a fashion that your converted text can then be converted back by someone trusted?
This is a question that falls under the field of cryptography. In general, this is called Encryption. You want to encrypt a message in such a fashion that it can be decoded back.
Obviously this is no simple topic. But you can make a basic program with a very naive and simplistic encryption mechanism rather easily. If you are already comfortable programming and can deal with the reading material on other existing algorithms, then you'll want to look at existing block and stream ciphers.
By the way, you want to precise on terms. You want a cipher here, because you're converting letter by letter into something else. A basic substitution cipher is a good exercise, and probably what you will be happy with (right?). Read up on all this on wikipedia.
Can you program? If you haven't, then your first challenge is to actually get comfortable in programming, then attempt to write this encryption-decryption algorithm.
When you ask a question, be prepared to tell us: what have you tried? If you think you don't need to try anything, we will never be interested in helping you. If you agree with the link, and you refuse to answer that question, you are being a hypocrite.
Need help with broken code? Your question should be like a good bug report: (1) It has the smallest number of steps to reproduce the problem you see (2) It tells us precisely what you expected to see and (3) It tells us what you saw and how it differed from what you expected. We need all three to help you.
Want better answers? Tell us what you Googled for and what steps you took to answer your own question.