![]() |
TrinityCore
|
#include <SecretMgr.h>
Classes | |
| struct | Secret |
Public Member Functions | |
| SecretMgr (SecretMgr const &)=delete | |
| SecretMgr (SecretMgr &&)=delete | |
| SecretMgr & | operator= (SecretMgr const &)=delete |
| SecretMgr & | operator= (SecretMgr &&)=delete |
| void | Initialize (SecretOwner owner) |
| Secret const & | GetSecret (Secrets i) |
Static Public Member Functions | |
| static SecretMgr * | instance () |
Static Public Attributes | |
| static SecretOwner | OWNER |
Private Member Functions | |
| SecretMgr () | |
| ~SecretMgr () | |
| void | AttemptLoad (Secrets i, LogLevel errorLevel, std::scoped_lock< std::mutex > const &) |
| Optional< std::string > | AttemptTransition (Secrets i, Optional< BigNumber > const &newSecret, Optional< BigNumber > const &oldSecret, bool hadOldSecret) const |
Private Attributes | |
| std::array< Secret, NUM_SECRETS > | _secrets |
Definition at line 45 of file SecretMgr.h.
|
privatedefault |
|
privatedefault |
|
delete |
|
delete |
|
private |
Definition at line 112 of file SecretMgr.cpp.
References _secrets, AttemptTransition(), GetHexFromConfig(), SecretMgr::Secret::LOAD_FAILED, LOGIN_SEL_SECRET_DIGEST, LoginDatabase, SecretMgr::Secret::NOT_PRESENT, OWNER, SecretMgr::Secret::PRESENT, secret_info, PreparedStatementBase::setUInt32(), TC_LOG_INFO, TC_LOG_MESSAGE_BODY, and Trinity::Crypto::Argon2::Verify().
Referenced by GetSecret(), and Initialize().
|
private |
Definition at line 174 of file SecretMgr.cpp.
References Field::GetBinary(), Field::GetUInt32(), Trinity::Crypto::Argon2::Hash(), Trinity::Crypto::AES::KEY_SIZE_BYTES, LOGIN_DEL_SECRET_DIGEST, LOGIN_INS_SECRET_DIGEST, LOGIN_UPD_ACCOUNT_TOTP_SECRET, LoginDatabase, secret_info, SECRET_TOTP_MASTER_KEY, PreparedStatementBase::setBinary(), BigNumber::SetRand(), PreparedStatementBase::setString(), PreparedStatementBase::setUInt32(), and Trinity::StringFormat().
Referenced by AttemptLoad().
| SecretMgr::Secret const & SecretMgr::GetSecret | ( | Secrets | i | ) |
Definition at line 103 of file SecretMgr.cpp.
References _secrets, AttemptLoad(), LOG_LEVEL_ERROR, and SecretMgr::Secret::NOT_LOADED_YET.
| void SecretMgr::Initialize | ( | SecretOwner | owner | ) |
Definition at line 88 of file SecretMgr.cpp.
References _secrets, ABORT, AttemptLoad(), flags, LOG_LEVEL_FATAL, NUM_SECRETS, OWNER, and secret_info.
|
static |
|
private |
Definition at line 84 of file SecretMgr.h.
Referenced by AttemptLoad(), GetSecret(), and Initialize().
|
static |
Definition at line 52 of file SecretMgr.h.
Referenced by AttemptLoad(), SecretInfo::flags(), and Initialize().