![]() |
TrinityCore
|
#include <CryptoHash.h>
Public Types | |
| using | Digest = std::array< uint8, DIGEST_LENGTH > |
Public Member Functions | |
| GenericHash () | |
| GenericHash (GenericHash const &right) | |
| GenericHash (GenericHash &&right) noexcept | |
| ~GenericHash () | |
| GenericHash & | operator= (GenericHash const &right) |
| GenericHash & | operator= (GenericHash &&right) noexcept |
| void | UpdateData (uint8 const *data, size_t len) |
| void | UpdateData (std::string_view str) |
| void | UpdateData (std::string const &str) |
| void | UpdateData (char const *str) |
| template<typename Container > | |
| void | UpdateData (Container const &c) |
| void | Finalize () |
| Digest const & | GetDigest () const |
Static Public Member Functions | |
| static Digest | GetDigestOf (uint8 const *data, size_t len) |
| template<typename... Ts> | |
| static auto | GetDigestOf (Ts &&... pack) -> std::enable_if_t<!(std::is_integral_v< std::decay_t< Ts > >||...), Digest > |
Static Public Attributes | |
| static constexpr size_t | DIGEST_LENGTH = DigestLength |
Private Attributes | |
| EVP_MD_CTX * | _ctx |
| Digest | _digest = { } |
Definition at line 43 of file CryptoHash.h.
| using Trinity::Impl::GenericHash< HashCreator, DigestLength >::Digest = std::array<uint8, DIGEST_LENGTH> |
Definition at line 47 of file CryptoHash.h.
|
inline |
Definition at line 66 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::_ctx, and ASSERT.
|
inline |
Definition at line 72 of file CryptoHash.h.
|
inlinenoexcept |
Definition at line 77 of file CryptoHash.h.
|
inline |
Definition at line 82 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::_ctx, and Trinity::Impl::GenericHashImpl::DestroyCTX().
|
inline |
Definition at line 122 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::_ctx, Trinity::Impl::GenericHash< HashCreator, DigestLength >::_digest, ASSERT, and Trinity::Impl::GenericHash< HashCreator, DigestLength >::DIGEST_LENGTH.
Referenced by Trinity::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf(), Trinity::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf(), WorldSocket::HandleAuthSessionCallback(), WardenMac::HandleCheckResult(), AuthSession::HandleReconnectProof(), and AuthSession::VerifyVersion().
|
inline |
Definition at line 130 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::_digest.
Referenced by Trinity::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf(), Trinity::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf(), WorldSocket::HandleAuthSessionCallback(), WardenMac::HandleCheckResult(), AuthSession::HandleReconnectProof(), and AuthSession::VerifyVersion().
|
inlinestatic |
|
inlinestatic |
Definition at line 49 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::Finalize(), Trinity::Impl::GenericHash< HashCreator, DigestLength >::GetDigest(), and Trinity::Impl::GenericHash< HashCreator, DigestLength >::UpdateData().
Referenced by Warden::BuildChecksum(), Trinity::Crypto::SRP6::CalculateVerifier(), Trinity::Crypto::SRP6::GetSessionVerifier(), WardenMac::HandleCheckResult(), WardenMac::HandleHashResult(), AddonMgr::LoadFromDB(), Warden::MakeModuleForClient(), Trinity::Crypto::SRP6::SHA1Interleave(), UpdateFetcher::Update(), and Trinity::Crypto::SRP6::VerifyChallengeResponse().
|
inlinenoexcept |
Definition at line 101 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::_ctx, Trinity::Impl::GenericHash< HashCreator, DigestLength >::_digest, and Trinity::Impl::GenericHashImpl::MakeCTX().
|
inline |
Definition at line 90 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::_ctx, Trinity::Impl::GenericHash< HashCreator, DigestLength >::_digest, and ASSERT.
|
inline |
Definition at line 118 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::UpdateData().
Referenced by Trinity::Impl::GenericHash< HashCreator, DigestLength >::UpdateData().
|
inline |
Definition at line 120 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::UpdateData().
Referenced by Trinity::Impl::GenericHash< HashCreator, DigestLength >::UpdateData().
|
inline |
Definition at line 117 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::UpdateData().
Referenced by Trinity::Impl::GenericHash< HashCreator, DigestLength >::UpdateData().
|
inline |
Definition at line 116 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::UpdateData().
Referenced by Trinity::Impl::GenericHash< HashCreator, DigestLength >::UpdateData().
|
inline |
Definition at line 111 of file CryptoHash.h.
References Trinity::Impl::GenericHash< HashCreator, DigestLength >::_ctx, and ASSERT.
Referenced by Trinity::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf(), Trinity::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf(), WorldSocket::HandleAuthSessionCallback(), WardenMac::HandleCheckResult(), AuthSession::HandleReconnectProof(), and AuthSession::VerifyVersion().
|
private |
Definition at line 133 of file CryptoHash.h.
Referenced by Trinity::Impl::GenericHash< HashCreator, DigestLength >::Finalize(), Trinity::Impl::GenericHash< HashCreator, DigestLength >::GenericHash(), Trinity::Impl::GenericHash< HashCreator, DigestLength >::operator=(), Trinity::Impl::GenericHash< HashCreator, DigestLength >::operator=(), Trinity::Impl::GenericHash< HashCreator, DigestLength >::UpdateData(), and Trinity::Impl::GenericHash< HashCreator, DigestLength >::~GenericHash().
|
private |
Definition at line 134 of file CryptoHash.h.
Referenced by Trinity::Impl::GenericHash< HashCreator, DigestLength >::Finalize(), Trinity::Impl::GenericHash< HashCreator, DigestLength >::GetDigest(), Trinity::Impl::GenericHash< HashCreator, DigestLength >::operator=(), and Trinity::Impl::GenericHash< HashCreator, DigestLength >::operator=().
|
staticconstexpr |
Definition at line 46 of file CryptoHash.h.
Referenced by Trinity::Impl::GenericHash< HashCreator, DigestLength >::Finalize(), WardenWin::HandleCheckResult(), and Trinity::Crypto::SRP6::SHA1Interleave().