From 5b04b71c4d1d9ef7b918a876c51f4d1788eb84c0 Mon Sep 17 00:00:00 2001 From: Edo Date: Sun, 30 Apr 2023 13:07:45 +0100 Subject: [PATCH] [Utils]: Code style update (#990) --- src/Utils/Cryptography.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Utils/Cryptography.cpp b/src/Utils/Cryptography.cpp index 7d003641..dd4047c7 100644 --- a/src/Utils/Cryptography.cpp +++ b/src/Utils/Cryptography.cpp @@ -19,13 +19,13 @@ namespace Utils std::string Rand::GenerateChallenge() { char buffer[512]{}; - int buffer_pos = 0; + int pos = 0; - buffer_pos += sprintf_s(&buffer[buffer_pos], sizeof(buffer) - buffer_pos, "%X", GenerateInt()); - buffer_pos += sprintf_s(&buffer[buffer_pos], sizeof(buffer) - buffer_pos, "%X", ~timeGetTime() ^ GenerateInt()); - buffer_pos += sprintf_s(&buffer[buffer_pos], sizeof(buffer) - buffer_pos, "%X", GenerateInt()); + pos += sprintf_s(&buffer[pos], sizeof(buffer) - pos, "%X", GenerateInt()); + pos += sprintf_s(&buffer[pos], sizeof(buffer) - pos, "%X", ~timeGetTime() ^ GenerateInt()); + pos += sprintf_s(&buffer[pos], sizeof(buffer) - pos, "%X", GenerateInt()); - return std::string(buffer, static_cast(buffer_pos)); + return std::string(buffer, static_cast(pos)); } std::uint32_t Rand::GenerateInt()