changed Radix64::decode to return result as std::vector

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8520 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-06-18 13:45:08 +00:00
parent 6a924cb854
commit 13355a7efe
5 changed files with 23 additions and 44 deletions

View file

@ -860,14 +860,12 @@ int GeneratePasswordHash(std::string saltBin, std::string password, std::string
int CheckPasswordHash(std::string pwdHashRadix64, std::string password)
{
char output[1024];
char *buf = NULL;
size_t len = 1024;
Radix64::decode(pwdHashRadix64, buf, len);
std::vector<uint8_t> buf = Radix64::decode(pwdHashRadix64);
size_t len = buf.size();
for(unsigned int i = 0; (i < len) && (i < 1024); i++)
{
output[i] = buf[i];
}
delete []buf;
#if 0
std::cerr << "CheckPasswordHash() Input: " << pwdHashRadix64;