31 data << WorldPackets::Bits<1>(virtualRealmInfo.
IsLocal);
33 data << WorldPackets::SizedString::BitsSize<8>(virtualRealmInfo.
RealmNameActual);
78 uint32 realmJoinTicketSize;
88 if (realmJoinTicketSize)
100 data << Bits<1>(gameTime.
IsInIGR);
110 for (std::size_t i = 0; i < 16; ++i)
128 data << Size<uint32>(successInfo.
Templates);
130 data << successInfo.
Time;
134 data <<
uint8(raceClassAvailability.RaceID);
135 data << Size<uint32>(raceClassAvailability.Classes);
139 data <<
uint8(classAvailability.ClassID);
140 data <<
uint8(classAvailability.ActiveExpansionLevel);
141 data <<
uint8(classAvailability.AccountExpansionLevel);
142 data <<
uint8(classAvailability.MinActiveExpansionLevel);
169 data << virtualRealm;
173 data <<
uint32(characterTemplate->TemplateSetId);
174 data << Size<uint32>(characterTemplate->Classes);
177 data <<
uint8(templateClass.ClassID);
178 data <<
uint8(templateClass.FactionGroup);
181 data << SizedString::BitsSize<7>(characterTemplate->Name);
182 data << SizedString::BitsSize<10>(characterTemplate->Description);
197 data << WorldPackets::Bits<1>(waitInfo.
HasFCM);
229std::string
const RSAPrivateKey = R
"(-----BEGIN RSA PRIVATE KEY-----
230MIIEpAIBAAKCAQEA7rPc1NPDtFRRzmZbyzK48PeSU8YZ8gyFL4omqXpFn2DE683q
231f41Z2FeyYHsJTJtouMft7x6ADeZrN1tTkOsYEw1/Q2SD2pjmrMIwooKlxsvH+4af
232n6kCagNJxTj7wMhVzMDOJZG+hc/R0TfOzIPS6jCAB3uAn51EVCIpvoba20jFqfkT
233NpUjdvEO3IQNlAISqJfzOxTuqm+YBSdOH6Ngpana2BffM8viE1SLGLDKubuIZAbf
234dabXYQC7sFoOetR3CE0V4hCDsASqnot3qQaJXQhdD7gua8HLZM9uXNtPWGUIUfsN
235SBpvtj0fC93+Gx3wv7Ana/WOvMdAAf+nC4DWXwIDAQABAoIBACKa5q/gB2Y0Nyvi
236APrDXrZoXclRVd+WWxSaRaKaPE+vuryovI9DUbwgcpa0H5QAj70CF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N
253LOwwBQ6lz7P9RqYYB5wVlaRvEhb9+lCve/xVcxMeZ5GkOBPxVygYV9l/wNdE25Nz
254OHYtKG3GK3GEcFDwZU2LPHq21EroUAdtRfbrJ4KW2yc8igtXKxTBYw==
255-----END RSA PRIVATE KEY-----
258std::array<uint8, 32> constexpr EnterEncryptedModePrivateKey =
260 0x08, 0xBD, 0xC7, 0xA3, 0xCC, 0xC3, 0x4F, 0x3F,
261 0x6A, 0x0B, 0xFF, 0xCF, 0x31, 0xC1, 0xB6, 0x97,
262 0x69, 0x1E, 0x72, 0x9A, 0x0A, 0xAB, 0x2C, 0x77,
263 0xC3, 0x6F, 0x8A, 0xE7, 0x5A, 0x9A, 0xA7, 0xC9
266std::unique_ptr<Trinity::Crypto::RsaSignature> ConnectToRSA;
267std::unique_ptr<Trinity::Crypto::Ed25519> EnterEncryptedModeSigner;
272 std::unique_ptr<Trinity::Crypto::RsaSignature> rsa = std::make_unique<Trinity::Crypto::RsaSignature>();
273 if (!rsa->LoadKeyFromString(RSAPrivateKey))
276 ConnectToRSA = std::move(rsa);
282 ConnectToRSA.reset();
305 signBuffer.
append(whereBuffer);
311 std::vector<uint8> signature;
312 rsa.
Sign(signBuffer.
data(), signBuffer.
size(), digestGenerator, signature);
344 std::unique_ptr<Trinity::Crypto::Ed25519> ed25519 = std::make_unique<Trinity::Crypto::Ed25519>();
345 if (!ed25519->LoadFromByteArray(EnterEncryptedModePrivateKey))
348 EnterEncryptedModeSigner = std::move(ed25519);
354 EnterEncryptedModeSigner.reset();
357std::array<uint8, 32>
constexpr EnableEncryptionSeed = { 0x66, 0xBE, 0x29, 0x79, 0xEF, 0xF2, 0xD5, 0xB5, 0x61, 0x53, 0xF6, 0x5F, 0x45, 0xAE, 0x81, 0xCB,
358 0x32, 0xEC, 0x94, 0xEC, 0x75, 0xB3, 0x5F, 0x44, 0x6A, 0x63, 0x43, 0x67, 0x17, 0x20, 0x44, 0x34 };
359std::array<uint8, 16>
constexpr EnableEncryptionContext = { 0xA7, 0x1F, 0xB6, 0x9B, 0xC9, 0x7C, 0xDD, 0x96, 0xE9, 0xBB, 0xB8, 0x21, 0x39, 0x8D, 0x5A, 0xD4 };
368 std::vector<uint8> signature;
374 _worldPacket << Bits<1>(
Enabled);
void resize(size_t newsize)
bool Sign(std::array< uint8, N > const &message, DigestGenerator &generator, std::vector< uint8 > &output)
static Digest GetDigestOf(Container const &seed, uint8 const *data, size_t len)
std::array< uint8, 32 > Challenge
WorldPacket const * Write() override
std::array< uint32, 8 > DosChallenge
uint32 NativeRealmAddress
std::array< uint8, DigestLength > Digest
std::array< uint8, 32 > LocalChallenge
uint32 Result
the result of the authentication process, possible values are BattlenetRpcErrorCode
WorldPacket const * Write() override
Optional< AuthWaitInfo > WaitInfo
contains the queue wait information in case the account is in the login queue.
Optional< AuthSuccessInfo > SuccessInfo
contains the packet data in case that it has account information (It is never set when WaitInfo is se...
std::array< uint8, 32 > LocalChallenge
std::string RealmJoinTicket
std::array< uint8, DigestLength > Digest
static void ShutdownEncryption()
WorldPacket const * Write() override
uint32 NativeRealmAddress
static bool InitializeEncryption()
static bool InitializeEncryption()
static void ShutdownEncryption()
WorldPacket const * Write() override
std::array< uint8, 32 > const & EncryptionKey
WorldPacket const * Write() override
WorldPacket const * Write() override
std::array< uint8, 32 > constexpr EnableEncryptionSeed
ByteBuffer & operator<<(ByteBuffer &data, VirtualRealmNameInfo const &virtualRealmInfo)
std::array< uint8, 16 > constexpr EnableEncryptionContext
DataWriter< Container > Data(Container const &value)
OptionalInitWriter< T > OptionalInit(Optional< T > const &value)
std::vector< RaceClassAvailability > const * AvailableClasses
the minimum AccountExpansion required to select race/class combinations
uint8 ActiveExpansionLevel
the current server expansion, the possible values are in Expansions
uint8 AccountExpansionLevel
the current expansion of this account, the possible values are in Expansions
bool ForceCharacterTemplate
forces the client to always use a character template when creating a new character.
uint32 TimeRested
affects the return value of the GetBillingTimeRested() client API call, it is the number of seconds y...
std::vector< CharacterTemplate const * > Templates
list of pre-made character templates.
Optional< Timestamp<> > ExpansionTrialExpiration
expansion trial expiration unix timestamp
Optional< uint16 > NumPlayersAlliance
number of alliance players in this realm.
uint32 VirtualRealmAddress
a special identifier made from the Index, BattleGroup and Region.
Optional< BaseBuildKey > CurrentBuild
uint32 TimeSecondsUntilPCKick
uint32 CurrencyID
this is probably used for the ingame shop.
std::vector< VirtualRealmInfo > VirtualRealms
list of realms connected to this one (inclusive)
Optional< uint16 > NumPlayersHorde
number of horde players in this realm.
bool HasFCM
true if the account has a forced character migration pending.
bool CanCreateOnlyIfExisting
Can create characters on realm only if player has other existing characters there.
uint8 AllowedFactionGroupForCharacterCreate
uint32 WaitCount
position of the account in the login queue
uint32 WaitTime
Wait time in login queue in minutes, if sent queued and this value is 0 client displays "unknown time...
std::array< uint8, 16 > ConfigKey
std::array< uint8, 16 > BuildKey
std::array< char, 128 > Name
std::array< uint8, 4 > V4
std::array< uint8, 16 > V6
union WorldPackets::Auth::ConnectTo::SocketAddress::@310 Address
VirtualRealmNameInfo RealmNameInfo
uint32 RealmAddress
the virtual address of this realm, constructed as RealmHandle::Region << 24 | RealmHandle::Battlegrou...
std::string RealmNameActual
the name of the realm
std::string RealmNameNormalized
the name of the realm without spaces
bool IsLocal
true if the realm is the same as the account's home realm