very minor refactoring to Auth_Data
This commit is contained in:
parent
c5ce7ad44b
commit
48a8ada43f
36
dll/auth.h
36
dll/auth.h
@ -321,28 +321,44 @@ struct Auth_Data {
|
|||||||
|
|
||||||
std::vector<uint8_t> Serialize()
|
std::vector<uint8_t> Serialize()
|
||||||
{
|
{
|
||||||
std::vector<uint8_t> buffer;
|
const uint64_t steam_id = id.ConvertToUint64();
|
||||||
uint8_t* pBuffer;
|
|
||||||
|
PRINT_DEBUG(
|
||||||
|
"AUTH::Auth_Data::SER:\n"
|
||||||
|
" HasGC: %u\n"
|
||||||
|
" user steam_id: %I64u\n"
|
||||||
|
" number: %llu\n",
|
||||||
|
|
||||||
|
(int)HasGC,
|
||||||
|
steam_id,
|
||||||
|
number
|
||||||
|
);
|
||||||
|
|
||||||
std::vector<uint8_t> tickedData = Ticket.Serialize();
|
std::vector<uint8_t> tickedData = Ticket.Serialize();
|
||||||
uint32_t size = tickedData.size() + 4;
|
size_t size = tickedData.size() + 4;
|
||||||
std::vector<uint8_t> GCData;
|
std::vector<uint8_t> GCData;
|
||||||
if (HasGC)
|
if (HasGC)
|
||||||
{
|
{
|
||||||
GCData = GC.Serialize();
|
GCData = GC.Serialize();
|
||||||
size += GCData.size() + 4;
|
size += GCData.size() + 4;
|
||||||
}
|
}
|
||||||
PRINT_DEBUG("Ticket Ser Size: %u\n", size);
|
PRINT_DEBUG("AUTH::Auth_Data::SER final size = %zu\n", size);
|
||||||
buffer.resize(size+STEAM_APPTICKET_SIGLEN);
|
|
||||||
pBuffer = buffer.data();
|
std::vector<uint8_t> buffer;
|
||||||
|
buffer.resize(size + STEAM_APPTICKET_SIGLEN);
|
||||||
|
uint8_t* pBuffer = buffer.data();
|
||||||
|
|
||||||
if (HasGC)
|
if (HasGC)
|
||||||
{
|
{
|
||||||
memcpy(pBuffer, GCData.data(), GCData.size());
|
memcpy(pBuffer, GCData.data(), GCData.size());
|
||||||
pBuffer+= GCData.size();
|
pBuffer+= GCData.size();
|
||||||
*reinterpret_cast<uint32_t*>(pBuffer) = (128+tickedData.size()+4); pBuffer += 4;
|
|
||||||
|
*reinterpret_cast<uint32_t*>(pBuffer) = (128+tickedData.size()+4);
|
||||||
|
pBuffer += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
*reinterpret_cast<uint32_t*>(pBuffer) = (tickedData.size()+4); pBuffer += 4;
|
*reinterpret_cast<uint32_t*>(pBuffer) = (tickedData.size()+4);
|
||||||
|
pBuffer += 4;
|
||||||
memcpy(pBuffer, tickedData.data(), tickedData.size());
|
memcpy(pBuffer, tickedData.data(), tickedData.size());
|
||||||
|
|
||||||
#ifndef EMU_RELEASE_BUILD
|
#ifndef EMU_RELEASE_BUILD
|
||||||
|
Loading…
x
Reference in New Issue
Block a user