#pragma once #include #include #include #include #include #include #include "Crypto.h" #include "Logger.h" #include "NanoPBHelper.h" #include "Utils.h" #include "protobuf/authentication.pb.h" #include "protobuf/keyexchange.pb.h" namespace cspot { class AuthChallenges { public: AuthChallenges(); ~AuthChallenges(); std::vector shanSendKey = {}; std::vector shanRecvKey = {}; std::vector prepareAuthPacket(std::vector& authBlob, int authType, const std::string& deviceId, const std::string& username); std::vector solveApHello(std::vector& helloPacket, std::vector& data); std::vector prepareClientHello(); private: const long long SPOTIFY_VERSION = 0x10800000000; ClientResponseEncrypted authRequest; ClientResponsePlaintext clientResPlaintext; ClientHello clientHello; APResponseMessage apResponse; std::unique_ptr crypto; }; } // namespace cspot