mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 04:37:01 +00:00
[12062] Cleanup MaNGOS sources
This commit is contained in:
parent
a4cbed3199
commit
aeff8f9d1a
46 changed files with 1982 additions and 1864 deletions
|
|
@ -19,7 +19,7 @@
|
|||
#include "Auth/HMACSHA1.h"
|
||||
#include "BigNumber.h"
|
||||
|
||||
HMACSHA1::HMACSHA1(uint32 len, uint8 *seed)
|
||||
HMACSHA1::HMACSHA1(uint32 len, uint8* seed)
|
||||
{
|
||||
HMAC_CTX_init(&m_ctx);
|
||||
HMAC_Init_ex(&m_ctx, seed, len, EVP_sha1(), NULL);
|
||||
|
|
@ -30,17 +30,17 @@ HMACSHA1::~HMACSHA1()
|
|||
HMAC_CTX_cleanup(&m_ctx);
|
||||
}
|
||||
|
||||
void HMACSHA1::UpdateBigNumber(BigNumber *bn)
|
||||
void HMACSHA1::UpdateBigNumber(BigNumber* bn)
|
||||
{
|
||||
UpdateData(bn->AsByteArray(), bn->GetNumBytes());
|
||||
}
|
||||
|
||||
void HMACSHA1::UpdateData(const uint8 *data, int length)
|
||||
void HMACSHA1::UpdateData(const uint8* data, int length)
|
||||
{
|
||||
HMAC_Update(&m_ctx, data, length);
|
||||
}
|
||||
|
||||
void HMACSHA1::UpdateData(const std::string &str)
|
||||
void HMACSHA1::UpdateData(const std::string& str)
|
||||
{
|
||||
UpdateData((uint8 const*)str.c_str(), str.length());
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ void HMACSHA1::Finalize()
|
|||
MANGOS_ASSERT(length == SHA_DIGEST_LENGTH);
|
||||
}
|
||||
|
||||
uint8 *HMACSHA1::ComputeHash(BigNumber *bn)
|
||||
uint8* HMACSHA1::ComputeHash(BigNumber* bn)
|
||||
{
|
||||
HMAC_Update(&m_ctx, bn->AsByteArray(), bn->GetNumBytes());
|
||||
Finalize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue