From 4d5dff7b4570cffaa3520f8d8ef8fd9f30be7524 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Fri, 13 Jan 2012 20:03:26 +0200 Subject: [PATCH] Fix auth library for BE-platforms --- stglibs/ia.lib/ia.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stglibs/ia.lib/ia.cpp b/stglibs/ia.lib/ia.cpp index dc8d553e..148750d2 100644 --- a/stglibs/ia.lib/ia.cpp +++ b/stglibs/ia.lib/ia.cpp @@ -299,14 +299,14 @@ if (!isNetPrepared) int db = sizeof(HDR_8); for (int i = 0; i < IA_LOGIN_LEN/8; i++) { - Blowfish_Encrypt(&ctxHdr, (uint32_t*)(buffer + db + i*8), (uint32_t*)(buffer + db + i*8 + 4)); + EncodeString(buffer + db + i * 8, buffer + db + i * 8, &ctxHdr); } db += IA_LOGIN_LEN; int encLen = (len - sizeof(HDR_8) - IA_LOGIN_LEN)/8; for (int i = 0; i < encLen; i++) { - Blowfish_Encrypt(&ctxPass, (uint32_t*)(buffer + db), (uint32_t*)(buffer + db + 4)); + EncodeString(buffer + db, buffer + db, &ctxPass); db += 8; } @@ -331,7 +331,7 @@ if (res == -1) if (strcmp(buffer + 4 + sizeof(HDR_8), "ERR")) { for (int i = 0; i < len/8; i++) - Blowfish_Decrypt(&ctxPass, (uint32_t*)(buffer + i*8), (uint32_t*)(buffer + i*8 + 4)); + DecodeString(buffer + i * 8, buffer + i * 8, &ctxPass); } return 0; -- 2.44.2