WowCrypto is a PHP library for World of Warcraft authentication data and SOAP console commands.
It is designed for CMS or launcher integrations that need to:
- generate emulator-specific password data
- verify credentials against the expected emulator format
- prepare account payloads for insertion from the host application
- execute TrinityCore-style SOAP commands through a modular API
The library does not need to own account creation inside your CMS. Its main job is to generate the correct auth data and provide a clean command surface for console actions.
- Support for multiple emulator families.
- SHA_PASS_HASH support for MaNGOS-style auth.
- SRP6 support for TrinityCore and AzerothCore style auth.
- Battle.net style hash support for SkyFire-like flows.
- Emulator-specific account payload generation for host CMS integrations.
- Modular SOAP command API for account, mail, character, moderation, and server actions.
- Safe SOAP command building for arguments with spaces or quotes.
- MaNGOS
- CMaNGOS
- TrinityCore
- AzerothCore
- SkyFire
SHA_PASS_HASHSRP6_V1SRP6_V2BNET
- PHP
>= 8.1 ext-opensslext-gmp
composer require wowcrypto/wowcryptouse GameCrypto\Enums\EmulatorType;
use GameCrypto\WoWCrypto;
$crypto = new WoWCrypto(EmulatorType::TRINITY_CORE);
$payload = $crypto->encrypt('USERNAME', 'PASSWORD');
$isValid = $crypto->verify('USERNAME', 'PASSWORD', $payload);The main entry point is GameCrypto\WoWCrypto.
Available methods:
encrypt(string $username, string $password): arrayverify(string $username, string $password, array|string $hash): boolprepareAccountPayload(string $username, string $password, ?string $email = null): array
use GameCrypto\Enums\EmulatorType;
use GameCrypto\WoWCrypto;
$crypto = new WoWCrypto(EmulatorType::MANGOS);
$payload = $crypto->encrypt('USERNAME', 'PASSWORD');
// Example result:
// ['hash' => '...']use GameCrypto\Enums\EmulatorType;
use GameCrypto\WoWCrypto;
$crypto = new WoWCrypto(EmulatorType::TRINITY_CORE);
$payload = $crypto->encrypt('USERNAME', 'PASSWORD');
// Example result:
// ['salt' => '...', 'verifier' => '...']use GameCrypto\Enums\EmulatorType;
use GameCrypto\WoWCrypto;
$crypto = new WoWCrypto(EmulatorType::SKYFIRE);
$payload = $crypto->encrypt('EMAIL@EXAMPLE.COM', 'PASSWORD');
// Example result:
// ['hash' => '...']use GameCrypto\Enums\EmulatorType;
use GameCrypto\WoWCrypto;
$crypto = new WoWCrypto(EmulatorType::TRINITY_CORE);
$payload = $crypto->encrypt('USERNAME', 'PASSWORD');
$valid = $crypto->verify('USERNAME', 'PASSWORD', $payload);If you need to force a specific encryption variant, pass an emulator config.
use GameCrypto\Config\TrinityConfig;
use GameCrypto\Enums\EmulatorType;
use GameCrypto\Enums\EncryptionType;
use GameCrypto\WoWCrypto;
$config = new TrinityConfig(EncryptionType::SRP6_V1);
$crypto = new WoWCrypto(EmulatorType::TRINITY_CORE, $config);This library is intended to work well when your CMS owns validation, insertion, and account linking.
Use prepareAccountPayload(...) when your application needs emulator-specific data for the auth database.
use GameCrypto\Enums\EmulatorType;
use GameCrypto\WoWCrypto;
$crypto = new WoWCrypto(EmulatorType::TRINITY_CORE);
$payload = $crypto->prepareAccountPayload('USERNAME', 'PASSWORD', 'mail@example.com');The payload is shaped for a CMS flow that typically:
- checks duplicates in the auth
accounttable - inserts emulator-specific credential columns
- reads the auth account primary key
- links that created game account to the local CMS user
prepareAccountPayload(...) returns an array with these top-level keys:
emulatoridentitycmscredentials
Contains normalized identity data used by the host application.
Example fields:
usernameemaillogin_fieldlogin_value
Contains host-application-oriented metadata.
Example fields:
account_tableaccount_primary_keylookupinsert
Contains the emulator-specific auth values.
Examples:
- MaNGOS:
sha_pass_hash - TrinityCore:
salt,verifier - SkyFire:
bnet_hash
use GameCrypto\Enums\EmulatorType;
use GameCrypto\WoWCrypto;
$crypto = new WoWCrypto(EmulatorType::MANGOS);
$payload = $crypto->prepareAccountPayload('USERNAME', 'PASSWORD', 'mail@example.com');
// Relevant fields:
// $payload['cms']['lookup']['username']
// $payload['cms']['insert']['sha_pass_hash']
// $payload['credentials']['sha_pass_hash']use GameCrypto\Enums\EmulatorType;
use GameCrypto\WoWCrypto;
$crypto = new WoWCrypto(EmulatorType::TRINITY_CORE);
$payload = $crypto->prepareAccountPayload('USERNAME', 'PASSWORD', 'mail@example.com');
// Relevant fields:
// $payload['cms']['insert']['salt']
// $payload['cms']['insert']['verifier']
// $payload['credentials']['salt']
// $payload['credentials']['verifier']use GameCrypto\Enums\EmulatorType;
use GameCrypto\WoWCrypto;
$crypto = new WoWCrypto(EmulatorType::SKYFIRE);
$payload = $crypto->prepareAccountPayload('USERNAME', 'PASSWORD', 'mail@example.com');
// Relevant fields:
// $payload['identity']['login_field'] === 'email'
// $payload['credentials']['bnet_hash']GameCrypto\SoapAccountCreator is the transport entry point for SOAP console commands.
It exposes a modular surface instead of concentrating all commands in a single file.
Available modules:
account()mail()character()moderation()server()
Low-level helpers still available on the transport:
customCommand(string $command): stringexecute(SoapCommand|string $command): stringexecuteSegments(iterable $segments): string
use GameCrypto\SoapAccountCreator;
$soap = new SoapAccountCreator('127.0.0.1', 7878, 'soap_user', 'soap_pass', 'TC');
$result = $soap->server()->info();$soap->account()->create('USERNAME', 'PASSWORD', 'mail@example.com');
$soap->account()->createBnet('mail@example.com', 'PASSWORD');$soap->mail()->send('PLAYERNAME', 'Welcome', 'Your rewards are waiting.');
$soap->mail()->sendMoney(
'PLAYERNAME',
'Compensation',
'Thanks for your patience.',
500000
);
$soap->mail()->sendItems(
'PLAYERNAME',
'Starter Pack',
'Enjoy your items.',
[6948 => 1, 17031 => 5]
);
$soap->mail()->sendItemsAndMoney(
'PLAYERNAME',
'Bundle',
'Items and gold included.',
[6948 => 1, 17031 => 5],
100000
);$soap->character()->rename('PLAYERNAME');
$soap->character()->customize('PLAYERNAME');
$soap->character()->changeRace('PLAYERNAME');
$soap->character()->changeFaction('PLAYERNAME');
$soap->character()->setLevel('PLAYERNAME', 80);$soap->moderation()->banAccount('ACCOUNTNAME', '7d', 'Chargeback investigation');
$soap->moderation()->unbanAccount('ACCOUNTNAME');
$soap->moderation()->banCharacter('PLAYERNAME', '1d', 'Abusive chat');
$soap->moderation()->unbanCharacter('PLAYERNAME');$soap->server()->info();For commands that do not yet have a dedicated module helper, you can still build them safely with segments.
$soap->executeSegments(['character', 'rename', 'Old Name']);
$soap->executeSegments(['send', 'mail', 'Player Name', 'Welcome title', 'Body with spaces']);If you already have the raw command string, you can still send it directly.
$soap->customCommand('server info');GameCrypto\SoapCommand exists for lower-level command construction when you want full control over composition and escaping.
use GameCrypto\SoapCommand;
$command = SoapCommand::fromSegments(['character', 'rename', 'Player With Spaces']);
$soap->execute($command);Important public areas of the library:
src/WoWCrypto.php: encryption and payload facadesrc/Config/: emulator configuration objectssrc/Encryptors/: encryption implementationssrc/Enums/: emulator and encryption enumssrc/AccountPayloads/: CMS payload builderssrc/SoapAccountCreator.php: SOAP transport and module accesssrc/Modules/: SOAP command modulessrc/SoapCommand.php: safe SOAP command builder
- Username and email normalization may be emulator-specific. The payload builders already normalize values for the CMS-oriented account flow.
- SkyFire payloads currently expose Battle.net-oriented identity and hash data, but you should still verify the exact target auth schema in your host application.
- SOAP helpers are oriented to TrinityCore-style command usage.
This project is licensed under the MIT License. See LICENSE for details.