TrinityCore
Loading...
Searching...
No Matches
SecretMgr.cpp File Reference
#include "SecretMgr.h"
#include "AES.h"
#include "Argon2Hash.h"
#include "Config.h"
#include "CryptoGenerics.h"
#include "DatabaseEnv.h"
#include "Errors.h"
#include "Log.h"
#include "SharedDefines.h"
#include <functional>
#include <unordered_map>
+ Include dependency graph for SecretMgr.cpp:

Go to the source code of this file.

Classes

struct  SecretInfo
 

Macros

#define SECRET_FLAG_FOR(key, val, server)   server ## _ ## key = (val ## ull << (16*SERVER_PROCESS_ ## server))
 
#define SECRET_FLAG(key, val)   SECRET_FLAG_ ## key = val, SECRET_FLAG_FOR(key, val, AUTHSERVER), SECRET_FLAG_FOR(key, val, WORLDSERVER)
 

Enumerations

enum  SecretFlags : uint64
 

Functions

static Optional< BigNumberGetHexFromConfig (char const *configKey, int bits)
 

Variables

static constexpr SecretInfo secret_info [NUM_SECRETS]
 

Macro Definition Documentation

◆ SECRET_FLAG

#define SECRET_FLAG (   key,
  val 
)    SECRET_FLAG_ ## key = val, SECRET_FLAG_FOR(key, val, AUTHSERVER), SECRET_FLAG_FOR(key, val, WORLDSERVER)

Definition at line 31 of file SecretMgr.cpp.

◆ SECRET_FLAG_FOR

#define SECRET_FLAG_FOR (   key,
  val,
  server 
)    server ## _ ## key = (val ## ull << (16*SERVER_PROCESS_ ## server))

Definition at line 30 of file SecretMgr.cpp.

Enumeration Type Documentation

◆ SecretFlags

Definition at line 32 of file SecretMgr.cpp.

Function Documentation

◆ GetHexFromConfig()

static Optional< BigNumber > GetHexFromConfig ( char const *  configKey,
int  bits 
)
static

Definition at line 60 of file SecretMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ secret_info

constexpr SecretInfo secret_info[NUM_SECRETS]
staticconstexpr
Initial value:
=
{
{ "TOTPMasterSecret", "TOTPOldMasterSecret", 128, SERVER_PROCESS_AUTHSERVER, WORLDSERVER_DEFER_LOAD }
}
@ SERVER_PROCESS_AUTHSERVER

Definition at line 49 of file SecretMgr.cpp.