From 3ab057cd32382ce896b04eefad54cc794c517b48 Mon Sep 17 00:00:00 2001 From: RickyRister Date: Sun, 17 Aug 2025 20:26:37 -0700 Subject: [PATCH] base64 encode the hash --- servatrice/src/serversocketinterface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/servatrice/src/serversocketinterface.cpp b/servatrice/src/serversocketinterface.cpp index fe3884cfc..91d25a0af 100644 --- a/servatrice/src/serversocketinterface.cpp +++ b/servatrice/src/serversocketinterface.cpp @@ -747,7 +747,8 @@ Response::ResponseCode AbstractServerSocketInterface::cmdReplayDeleteMatch(const * Generates a hash for the given replay folder, used for auth when replay sharing. * This is a separate function in case we change the hash implementation in the future. * - * Currently, we append together the first 128 bytes of the first 3 replays in the game, and hash that. + * Currently, we append together the first 128 bytes of the first 3 replays in the game. + * Then we md5 hash it and base64 encode it. * * @param gameId The replay match to hash * @return The hash as a QString. Returns an empty string if failed @@ -768,7 +769,7 @@ QString AbstractServerSocketInterface::createHashForReplay(int gameId) replaysBytes.append(replay); } - return QCryptographicHash::hash(replaysBytes, QCryptographicHash::Md5); + return QCryptographicHash::hash(replaysBytes, QCryptographicHash::Md5).toBase64(); } Response::ResponseCode AbstractServerSocketInterface::cmdReplayGetCode(const Command_ReplayGetCode &cmd,