SA-MP Forums Archive
String Encryption and Decryption - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: String Encryption and Decryption (/showthread.php?tid=260480)



String Encryption and Decryption - Aron_Johnson - 09.06.2011

Hello,

My script is apperently having different commands where you need to fill in a password that is encrypted. Once you do that you will be able to "hack" the server. So I was wondering if there is any possibility to get to know this password and change it. Or is the only way by removing it.

It is currently using:
Код:
public Encrypt(string[])
{
	for(new x=0; x < strlen(string); x++)
	  {
		  string[x] += (3^x) * (x % 15);
		  if(string[x] > (0xff))
		  {
			  string[x] -= 256;
		  }
	  }
	return 1;
}
So how do I decrypt a string like this, and is it even possible?


Re: String Encryption and Decryption - Aron_Johnson - 09.06.2011

Well the thing is that it looks good to use it in further commands, also I am just curious what it is..

And what should I use next to this then?


Re: String Encryption and Decryption - Aron_Johnson - 09.06.2011

Bump, anybody got an idea how to make it?


Re: String Encryption and Decryption - Scenario - 09.06.2011

You clearly don't know anything about coding in PAWN. Once you learn, people will want to help. Encryption should be something on your mind at a later date.


Re: String Encryption and Decryption - Aron_Johnson - 11.06.2011

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
You clearly don't know anything about coding in PAWN. Once you learn, people will want to help. Encryption should be something on your mind at a later date.
Well thank you for your nice reaction. Even though it is true that I do not understand the Encryption part, but isn't this why there is a forum to ask questions? I would like to understand it, so is there anybody who is willing to help/explain it to me?