AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   encrypt <-> decrypt string (https://forums.alliedmods.net/showthread.php?t=187651)

killergirl 06-16-2012 05:39

encrypt <-> decrypt string
 
I can't use md5, because I can't decrypt data. I need to a encrypt and decrypt a string, but how could be possible?

<VeCo> 06-16-2012 06:35

Re: encrypt <-> decrypt string
 
This?
http://forums.alliedmods.net/showthread.php?t=169405

Liverwiz 06-16-2012 13:31

Re: encrypt <-> decrypt string
 
There's a couple encryption plugins laying around the site. Not many i've seen are up to my standards of encryption security....but a human won't read them without trouble.

md5 is NOT encryption. Its a hashing method. It'd be good if you want to store passwords or other authentication information. But once the data gets hashed, it isn't come back from it. algorithmicly.

hornet 06-17-2012 04:15

Re: encrypt <-> decrypt string
 
Explain what your trying to do.

claudiuhks 06-17-2012 05:50

Re: encrypt <-> decrypt string
 
Code:
new const g_iMyOwnDecimals[ ] = {   15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39, 15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39, 15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39, 15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39, 15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39, 15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39, 15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39, 15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39, 15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39, 15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39, 15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39, 15, 25, 32, 54, 92, 24, 75, 23, 12, 12, 63, 64, 56, 13, 12, 15, 83, 32, 12, 32, 53, 78, 93, 92, 31, 51, 56, 66, 77, 88, 99, 13, 14, 15, 16, 17, 18, 73, 31, 12, 25, 27, 28, 35, 39 }; Encript( cString[ ], iChars ) {   static i, j;   if( !j )     j = sizeof( g_iMyOwnDecimals );   for( i = 0; i < iChars; i++ )   {     if( i < j )       cString[ i ] += g_iMyOwnDecimals[ i ];     else     {       cString = "";       break;     }   } } Decript( cString[ ], iChars ) {   static i, j;   if( !j )     j = sizeof( g_iMyOwnDecimals );   for( i = 0; i < iChars; i++ )   {     if( i < j )       cString[ i ] -= g_iMyOwnDecimals[ i ];     else     {       cString = "";       break;     }   } }

Code:
new cString[ 32 ]; formatex( cString, 31, "%s", "Era odata..." ); Encript( cString, 32 ); // Use 32 for this function... From 0 to 31 are 32... Decript( cString, 32 ); // Use 32 for this function... From 0 to 31 are 32...


All times are GMT -4. The time now is 06:15.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.