From 4e9d885b26fb56335d58f2894149d4b4838b9279 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Mon, 7 Mar 2011 04:05:19 +0000 Subject: [PATCH] Slightly "crypted" mac --- platform/qt_download.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/qt_download.cpp b/platform/qt_download.cpp index a34f724648..cd39431682 100644 --- a/platform/qt_download.cpp +++ b/platform/qt_download.cpp @@ -4,6 +4,8 @@ #include "../base/logging.hpp" #include "../base/assert.hpp" +#include "../coding/bit_shift.hpp" + #include "../version/version.hpp" #include "../std/target_os.hpp" @@ -16,7 +18,7 @@ #define MAX_AUTOMATIC_RETRIES 2 /// @return mac address of active interface without colons or empty string if not found -/// @note mac is converted to decimal from hex +/// @note mac is converted to decimal from hex and slightly crypted static QString MacAddress() { QList interfaces = QNetworkInterface::allInterfaces(); @@ -33,6 +35,7 @@ static QString MacAddress() hwAddr.remove(':'); bool success = false; qulonglong numAddr = hwAddr.toULongLong(&success, 16); + numAddr = bits::ror(numAddr, 11); if (success) return QString("%1").arg(numAddr); }