mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 15:28:02 +00:00
refactor(Core): remove ace_autoptr, cleanup (#3276)
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
|
||||
#include "HMACSHA1.h"
|
||||
#include "BigNumber.h"
|
||||
#include "Common.h"
|
||||
#include "Errors.h"
|
||||
#include <cstring>
|
||||
|
||||
#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
HMAC_CTX* HMAC_CTX_new()
|
||||
@@ -23,8 +24,7 @@ void HMAC_CTX_free(HMAC_CTX* ctx)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
HmacHash::HmacHash(uint32 len, uint8 *seed)
|
||||
HmacHash::HmacHash(uint32 len, uint8* seed)
|
||||
{
|
||||
m_ctx = HMAC_CTX_new();
|
||||
HMAC_Init_ex(m_ctx, seed, len, EVP_sha1(), nullptr);
|
||||
@@ -36,14 +36,14 @@ HmacHash::~HmacHash()
|
||||
HMAC_CTX_free(m_ctx);
|
||||
}
|
||||
|
||||
void HmacHash::UpdateData(const std::string &str)
|
||||
void HmacHash::UpdateData(std::string const& str)
|
||||
{
|
||||
HMAC_Update(m_ctx, reinterpret_cast<uint8 const*>(str.c_str()), str.length());
|
||||
}
|
||||
|
||||
void HmacHash::UpdateData(const uint8* data, size_t len)
|
||||
void HmacHash::UpdateData(uint8 const* data, size_t len)
|
||||
{
|
||||
HMAC_Update(m_ctx, data, len);
|
||||
HMAC_Update(m_ctx, data, len);
|
||||
}
|
||||
|
||||
void HmacHash::Finalize()
|
||||
|
||||
Reference in New Issue
Block a user