diff --git a/library/src/encryption.cpp b/library/src/encryption.cpp index fd06cd0..12d86eb 100644 --- a/library/src/encryption.cpp +++ b/library/src/encryption.cpp @@ -136,9 +136,9 @@ inline auto GenerateAuthScramMessageImpl(std::string_view password, auto storedKey = HashImpl(clientKey, tag); auto authMessage = std::format("{},{},{}", initialMessage, firstServerMessage, clientFinalMessageBare); auto clientSignature = HmacImpl(ToCharStringView(storedKey), ToUnsignedCharStringView(authMessage), tag); - auto clientProof = std::views::iota(std::size_t{}, clientKey.size()) | // No std::views::enumerate in libc++ - std::views::transform([&](auto i) { - return clientKey[i] ^ clientSignature[i]; + auto clientProof = std::views::zip(clientKey, clientSignature) | // No std::views::enumerate in libc++ + std::views::transform([&](auto arg) { + return arg.first ^ arg.second; }) | std::ranges::to(); std::string serverKeyStr = "Server Key";