ok first of all im not even sure its called bit switching, but whatever it is, it wont work
the problem is, if i do the opposite of whatever i did to encrypt some text, it wont be back normal. im at school and dont have my code right now, but it was something to this effect:
and it didnt work. then i figured that maybe the bitswitching was "pushing the character off the edge", or trying to make it go farther than the ascii characters go, and so there might be several characters there, and thus there might not be a unique character for each character they type in. maybe that doesnt sound very clear, but what i was trying to say was that i think bitswitching seems unreliable. how can i encrypt something in such a way that:Code:#include <iostream> #include <string> int main() { char a[10]; cin >> a; a >> 1; a += 5; cout << a << "\n"; a -= 5; a << 1; cout << a << "\n"; system("Pause"); return 0; }
a: it will be somewhat difficult to crack (not like a += 1 and thats it)
2. i can unencrypt it with out problems
iii- preferably, i wont have to write out a huge amount of code
four~ i can use some sort of key/password thingy like other encryption uses i have seen.
thank you for your help, and have a nice summer (unless you live south of the equator, cause dont they have winter now? that sucks, i hate winter)