diff --git a/src/qmc2/ekey.cpp b/src/qmc2/ekey.cpp index 161de66..83ec553 100644 --- a/src/qmc2/ekey.cpp +++ b/src/qmc2/ekey.cpp @@ -26,14 +26,8 @@ std::string_view span2ss(std::span span) { return std::string_view(reinterpret_cast(span.data()), span.size()); } -void remove_trailing_zeros(std::vector& vec) { - auto it = std::find_if(vec.rbegin(), vec.rend(), [](uint8_t value) { return value != 0; }); - vec.erase(it.base(), vec.end()); -} - std::vector decrypt_ekey_v1(std::string_view ekey) { std::vector result = b64_decode(reinterpret_cast(ekey.data()), ekey.size()); - remove_trailing_zeros(result); uint32_t tea_key[4] = { 0x69005600 | static_cast(result[0] << 16) | (result[1]),