aboutsummaryrefslogtreecommitdiff
path: root/src/server/database/Database/PreparedStatement.h
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2020-08-02 22:52:21 +0200
committerGitHub <noreply@github.com>2020-08-02 22:52:21 +0200
commit3164b58c7d170810b69378950c0891e5f5b8678b (patch)
tree893d675ab6fcfd71c294a8922f337f063836e9ce /src/server/database/Database/PreparedStatement.h
parent10f49793f9a7cd67c7b8b203290d7ea5f1829795 (diff)
Core/Authserver: Re-organize the `accounts` table (PR #25135)
- no longer use sha_pass_hash for anything else core-side (.account, SOAP, RA) - salt/verifier/session_key are now binary - old s/v/sha_pass_hash fields kept around for backwards compatibility - sha_pass_hash is still updated (for now), s/v are not - sha_pass_hash is only read if s/v have been manually changed - SRP6 b now uses the full 32 bytes of randomness (instead of randomly only using 19)
Diffstat (limited to 'src/server/database/Database/PreparedStatement.h')
-rw-r--r--src/server/database/Database/PreparedStatement.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/database/Database/PreparedStatement.h b/src/server/database/Database/PreparedStatement.h
index e7f39156252..b920289623e 100644
--- a/src/server/database/Database/PreparedStatement.h
+++ b/src/server/database/Database/PreparedStatement.h
@@ -77,6 +77,12 @@ class TC_DATABASE_API PreparedStatementBase
void setDouble(const uint8 index, const double value);
void setString(const uint8 index, const std::string& value);
void setBinary(const uint8 index, const std::vector<uint8>& value);
+ template <size_t Size>
+ void setBinary(const uint8 index, std::array<uint8, Size> const& value)
+ {
+ std::vector<uint8> vec(value.begin(), value.end());
+ setBinary(index, vec);
+ }
uint32 GetIndex() const { return m_index; }
std::vector<PreparedStatementData> const& GetParameters() const { return statement_data; }