mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
b76161dd5f
commit
65e7ad0e5b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user