Encrypt string or source

hi guys
i have source c++ i want encrypt source or some string... coz after compile the c will be exe..

i want if some body edit exe in hex editor do not see some information.


i want encrypt soucre or string (url)

this is source :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
void Fetcher::fetch()
{	
  	// declare variable
	eString url, code;
         code = mytext->getText();
	// assign to the variable the url we want to connect
	url = "http://www.host.com/fine.php?actvcode="+code;
	// assign to class variable the temporary file we will use to store the dowanloaded data
	tempPath = "/var/keys/file save";
	// inizialize the control error flag
	int error = 0;
	// start connection
	connectionP = eHTTPConnection::doRequest(url.c_str(), eApp, &error);
	//Show a Messagebox in case of connection error
	if(!connectionP || error)
	{	eMessageBox msg("Error Activation " + url + "(" + eString().sprintf("%d", error) + ")", _("Details"), eMessageBox::btOK);
		msg.show();     msg.exec();     msg.hide();
	}
	else
	{
		//if the connection is estabilished start the download funcions
		CONNECT(connectionP->transferDone, Fetcher::transferDone);
		CONNECT(connectionP->createDataSource, Fetcher::createDownloadSink);
		// set the user-agent name
		connectionP->local_header["User-Agent"] = "PLBOT";
		connectionP->start();
	}
}


Essentially, you would encrypt the string using some encryption routine (either made up yourself or use a standard algorithm) then you would decrypt the string in your source.

Say you want to encrypt "http://www.host.com/fine.php?actvcode=". Also say you have an encryption routine which encrypts that string to "iuuq;,,xxx[iptu[dpn,gjof[qiq^bduwdpef<" (notice that this is a simple hash).

Your code would then look something like this:

1
2
3
4
5
6
7
void Fetcher::fetch()
{	
   // declare variable
   eString url, code;
   code = mytext->getText();
   // assign to the variable the url we want to connect
   url = Decrypt("iuuq;,,xxx[iptu[dpn,gjof[qiq^bduwdpef<")+code;


where in this case Decrypt returns the decrypted eString.
thanks shacktar

can you give me code or complete source ready to compile and ecrypt string url.
Giving complete solutions is frowned upon here. Depending on how strong you want your encryption, you could easily code it yourself. You can also easily find more advanced solutions online.
Topic archived. No new replies allowed.