Porting memory fixes
This commit is contained in:
committed by
mtjburton
parent
128139cdeb
commit
effed14ca3
@@ -109,8 +109,8 @@ static bool multiUserAuthorized(std::string strUserPass)
|
||||
std::string strHash = vFields[2];
|
||||
|
||||
unsigned int KEY_SIZE = 32;
|
||||
unsigned char *out = new unsigned char[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);
|
||||
std::vector<unsigned char> hexvec(out, out+KEY_SIZE);
|
||||
std::string strHashFromPass = HexStr(hexvec);
|
||||
|
||||
Reference in New Issue
Block a user