diff options
Diffstat (limited to 'src/modules/crypt/encrypt.cpp')
-rw-r--r-- | src/modules/crypt/encrypt.cpp | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/modules/crypt/encrypt.cpp b/src/modules/crypt/encrypt.cpp index 8880341c58..dbb2ee3374 100644 --- a/src/modules/crypt/encrypt.cpp +++ b/src/modules/crypt/encrypt.cpp @@ -25,41 +25,33 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //VERY VERY VERY BASIC ENCRYPTION FUNCTION
-void Encrypt(char*msg,BOOL up)
+void Encrypt(char*msg, BOOL up)
{
- int i;
int jump;
if (up)
- {
jump = 5;
- }
else
- {
jump = -5;
- }
-
- for (i = 0;msg[i];i++)
- {
- msg[i] = msg[i]+jump;
- }
+ for (int i = 0; msg[i]; i++)
+ msg[i] = msg[i] + jump;
}
-static INT_PTR EncodeString(WPARAM wParam,LPARAM lParam)
+static INT_PTR EncodeString(WPARAM wParam, LPARAM lParam)
{
- Encrypt((char*)lParam,TRUE);
+ Encrypt((char*)lParam, TRUE);
return 0;
}
-static INT_PTR DecodeString(WPARAM wParam,LPARAM lParam)
+static INT_PTR DecodeString(WPARAM wParam, LPARAM lParam)
{
- Encrypt((char*)lParam,FALSE);
+ Encrypt((char*)lParam, FALSE);
return 0;
}
int InitCrypt(void)
{
- CreateServiceFunction(MS_DB_CRYPT_ENCODESTRING,EncodeString);
- CreateServiceFunction(MS_DB_CRYPT_DECODESTRING,DecodeString);
+ CreateServiceFunction(MS_DB_CRYPT_ENCODESTRING, EncodeString);
+ CreateServiceFunction(MS_DB_CRYPT_DECODESTRING, DecodeString);
return 0;
}
|