pqihash now uses Sha1CheckSum

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6692 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-09-05 19:28:10 +00:00
parent b76161dd5f
commit 65e7ad0e5b

View File

@ -30,6 +30,7 @@
#include <string>
#include <iomanip>
#include "util/rsstring.h"
#include "retroshare/rstypes.h"
#include <inttypes.h>
class pqihash
@ -71,11 +72,14 @@ void Complete(std::string &hash)
SHA1_Final(sha_hash, sha_ctx);
endHash.clear();
for(int i = 0; i < SHA_DIGEST_LENGTH; i++)
{
rs_sprintf_append(endHash, "%02x", (unsigned int) (sha_hash[i]));
}
hash = endHash;
endHash = hash = Sha1CheckSum(sha_hash).toStdString() ;
// for(int i = 0; i < SHA_DIGEST_LENGTH; i++)
// {
// rs_sprintf_append(endHash, "%02x", (unsigned int) (sha_hash[i]));
// }
// hash = endHash;
doHash = false;
return;