////////////////////////////////// // Basic Encryption / Decryption. // Created By Ice_Dragon // http://raw-networks.com // ice_dragon@raw-networks.com ////////////////////////////////// #include #include using namespace std; int main() { string s; cout << "enter input: "; getline(cin, s); for(string::iterator si = s.begin(); si != s.end(); si++) *si+=5; cout << "encrypted string: \"" << s << "\"" << std::endl; char input; cout << "do you wish to decrypt it? "; cin >> input; switch(input) { case 'y': case 'Y': { for(string::iterator si = s.begin(); si != s.end(); si++) *si-=5; cout << "decrypted string: \"" << s << "\"" << std::endl; break; } } return 0; }