From 2f3540c996e52895fafd43b5fb134322d1498b28 Mon Sep 17 00:00:00 2001 From: Nailson Date: Mon, 30 Nov 2015 19:49:21 -0300 Subject: [PATCH] Small optimization. --- src/framework/util/crypt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framework/util/crypt.cpp b/src/framework/util/crypt.cpp index 29375e6e..8fcbb2a1 100644 --- a/src/framework/util/crypt.cpp +++ b/src/framework/util/crypt.cpp @@ -209,7 +209,7 @@ std::string Crypt::_encrypt(const std::string& decrypted_string, bool useMachine std::string Crypt::_decrypt(const std::string& encrypted_string, bool useMachineUUID) { std::string decoded = base64Decode(encrypted_string); - std::string tmp = xorCrypt(base64Decode(encrypted_string), getCryptKey(useMachineUUID)); + std::string tmp = xorCrypt(decoded, getCryptKey(useMachineUUID)); if(tmp.length() >= 4) { uint32 readsum = stdext::readULE32((const uint8*)tmp.c_str()); std::string decrypted_string = tmp.substr(4);