X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d1d9452a687184ac6b992fadc77e89c8a308e388..9f1473ca33ad6847f22809ca50aaa00fe4944e6c:/projects/stargazer/plugins/store/mysql/mysql_store.cpp diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.cpp b/projects/stargazer/plugins/store/mysql/mysql_store.cpp index 8f64acdf..3e61498f 100644 --- a/projects/stargazer/plugins/store/mysql/mysql_store.cpp +++ b/projects/stargazer/plugins/store/mysql/mysql_store.cpp @@ -116,8 +116,7 @@ MYSQL_STORE_SETTINGS::MYSQL_STORE_SETTINGS() dbUser(), dbPass(), dbName(), - dbHost(), - schemaVersion(0) + dbHost() { } //----------------------------------------------------------------------------- @@ -164,6 +163,7 @@ MYSQL_STORE::MYSQL_STORE() version("mysql_store v.0.67"), storeSettings(), settings(), + schemaVersion(0), logger(GetPluginLogger(GetStgLogger(), "store_mysql")) { } @@ -1260,14 +1260,14 @@ memset(pass, 0, sizeof(pass)); memset(adminPass, 0, sizeof(adminPass)); BLOWFISH_CTX ctx; -EnDecodeInit(adm_enc_passwd, strlen(adm_enc_passwd), &ctx); +InitContext(adm_enc_passwd, strlen(adm_enc_passwd), &ctx); strncpy(adminPass, ac.password.c_str(), ADM_PASSWD_LEN); adminPass[ADM_PASSWD_LEN - 1] = 0; for (int i = 0; i < ADM_PASSWD_LEN/8; i++) { - EncodeString(pass + 8*i, adminPass + 8*i, &ctx); + EncryptBlock(pass + 8*i, adminPass + 8*i, &ctx); } pass[ADM_PASSWD_LEN - 1] = 0; @@ -1356,11 +1356,11 @@ memset(pass, 0, sizeof(pass)); if (passwordE[0] != 0) { Decode21(pass, passwordE); - EnDecodeInit(adm_enc_passwd, strlen(adm_enc_passwd), &ctx); + InitContext(adm_enc_passwd, strlen(adm_enc_passwd), &ctx); for (int i = 0; i < ADM_PASSWD_LEN/8; i++) { - DecodeString(password + 8*i, pass + 8*i, &ctx); + DecryptBlock(password + 8*i, pass + 8*i, &ctx); } } else