#include #include int decode_token(std::string token) { // strip dashes from token token.erase(std::remove(token.begin(), token.end(), '-'), token.end()); // parse token from hex to unsigned int return static_cast(std::stoll(token, nullptr, 16)); }