Simple Text Encryption
Not sure why but I had a sudden urge to share this... It is my way of encrypting text thru vectors 

Code:
/*
* Author: Defcon Noob :)
* July 20, 2011
*/
#include <iostream>
#include <Windows.h>
#include <string>
#include <time.h>
#include <vector>
#include <math.h>
#include <stdio.h>
using namespace std;
int random;
void encrypt( string &m, vector<int> &e);
void decrypt( string &m, vector<int> &e);
int input;
int main( )
{
string m;
vector<int> e;
int choice;
int i=0;
cout << "Input string: " << endl;
getline(cin, m);
while(1){
cout << " " << endl;
cout << "Enter 0 for encrypt, 1 for decrypt." << endl;
cout << " " << endl;
Sleep(500);
cin >> choice;
if (choice)
{
input=45;
decrypt(m, e);
}
else
{
input=45;
encrypt(m, e);
}
Sleep(5000);
}
system("pause");
return 0;
}
void encrypt (string &m, vector<int> &e)
{
int size;
size = m.size();
for(int i=0; i < size; i++)
{
e.push_back((unsigned char)m[i] * input);
m[i] = ' ';
}
cout << " " << endl;
cout << "Encrypted string is: ";
cout << " " << endl;
for (int i = 0; i < e.size(); i++)
cout << e[i];
cout << endl;
}
void decrypt(string &m, vector<int> &e)
{
int size;
size = m.size();
for(int i=0; i < size; i++){
m[i] = (unsigned char)(e[i] / input );
}
cout << " " << endl;
cout << "Decrypted string is: " << m << endl;
cout << " " << endl;
}


