user input - a sentence of up to 80 characters / spaces
got the user input to work but how do you take the user input and change the order of the characters? and maybe even input a number or ()&%#@ everyonce in a while...
user input - a sentence of up to 80 characters / spaces
got the user input to work but how do you take the user input and change the order of the characters? and maybe even input a number or ()&%#@ everyonce in a while...
I suggest you search google for cryptography, as what you are mentioning would take a hacker 5 seconds to get around.
Do you know about characters, strings, and the ASCII code?
If you take an 'A' which has an ASCII value of 65, and add one to it, you'll get a 'B' which has an ASCII value of 66.
Have you studied bitwise operators? The most common simple encryption technique is to perform a bitwise-exclusive-or with each character and a "key" character. Performing another bitwise-exclusive-or on the result (with the same key) will decrypt the character.
Note that the above does not "change the order" of the characters, it changes the numeric value of each character... so that it is no longer valid ASCII, and will display as garbage.
Last edited by DougDbug; 01-14-2004 at 04:37 PM.
lol those games in that site kept me busy for 10 mins
You can't just mix up plaintext and call that encryption. A cryptosystem must be thought out well enough so that you can decrypt it, for crying out loud.
Instead of coming up with what you think is cryptography, look up a good cryptosystem and implement it. I suggest you start with a simple Caesar cipher and then move on to Vigenere.
Last edited by joshdick; 01-14-2004 at 11:32 PM.
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.
To piggy back on this suggestion, start with what you are attempting to do, and once you understand it, add some complexity. Work up to learning the more complex systems.Originally posted by joshdick
You can't just mix up plaintext and call that encryption. A cryptosystem must be thought out well enough so that you can decrypt it, for crying out loud.
Instead of coming up with what you think is cryptography, look up a good cryptosystem and implement it. I suggest you start with a simple Caesar cipher and then move on to Vigenere.
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers
Lookup the Handbook of Applied Cryptography on Google. It is available in PDF for free, and may provide a bit of insight for you.
*edit*
Forget the search, here's the link: http://www.cacr.math.uwaterloo.ca/hac/
Anyways, it deals with more modern methods of cryptography, so you should really familiarize yourself with some of the classical simpler methods first.
Last edited by Zach L.; 01-15-2004 at 08:24 PM.
You will need to look into what encryption libraries are available on your system. I suggest that you use the most recent NIST standard for encryption, AES, or the old stand-by 3DES. I don't suggest writing your own encryption algorithms if you really want it to be secure. If you just want to say that you have encrypted something so that no one can read it then use the ol' XOR algorithm.