Make KEY_SIZE a compile-time constant
This commit is contained in:
parent
f87e8f5392
commit
914fad155d
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ static bool multiUserAuthorized(std::string strUserPass)
|
||||||
std::string strSalt = vFields[1];
|
std::string strSalt = vFields[1];
|
||||||
std::string strHash = vFields[2];
|
std::string strHash = vFields[2];
|
||||||
|
|
||||||
unsigned int KEY_SIZE = 32;
|
static const unsigned int KEY_SIZE = 32;
|
||||||
unsigned char out[KEY_SIZE];
|
unsigned char out[KEY_SIZE];
|
||||||
|
|
||||||
CHMAC_SHA256(reinterpret_cast<const unsigned char*>(strSalt.c_str()), strSalt.size()).Write(reinterpret_cast<const unsigned char*>(strPass.c_str()), strPass.size()).Finalize(out);
|
CHMAC_SHA256(reinterpret_cast<const unsigned char*>(strSalt.c_str()), strSalt.size()).Write(reinterpret_cast<const unsigned char*>(strPass.c_str()), strPass.size()).Finalize(out);
|
||||||
|
|
Loading…
Reference in a new issue