mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
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:
parent
6a924cb854
commit
13355a7efe
5 changed files with 23 additions and 44 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue