#pragma once #include // for uint8_t #include // for unique_ptr #include // for string #include // for vector #include "Crypto.h" // for Crypto #include "protobuf/authentication.pb.h" // for ClientResponseEncrypted #include "protobuf/keyexchange.pb.h" // for APResponseMessage, ClientHello 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