mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-16 10:30:01 -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
1 changed files with 9 additions and 5 deletions
|
@ -30,6 +30,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include "util/rsstring.h"
|
#include "util/rsstring.h"
|
||||||
|
#include "retroshare/rstypes.h"
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
class pqihash
|
class pqihash
|
||||||
|
@ -71,11 +72,14 @@ void Complete(std::string &hash)
|
||||||
SHA1_Final(sha_hash, sha_ctx);
|
SHA1_Final(sha_hash, sha_ctx);
|
||||||
|
|
||||||
endHash.clear();
|
endHash.clear();
|
||||||
for(int i = 0; i < SHA_DIGEST_LENGTH; i++)
|
|
||||||
{
|
endHash = hash = Sha1CheckSum(sha_hash).toStdString() ;
|
||||||
rs_sprintf_append(endHash, "%02x", (unsigned int) (sha_hash[i]));
|
|
||||||
}
|
// for(int i = 0; i < SHA_DIGEST_LENGTH; i++)
|
||||||
hash = endHash;
|
// {
|
||||||
|
// rs_sprintf_append(endHash, "%02x", (unsigned int) (sha_hash[i]));
|
||||||
|
// }
|
||||||
|
// hash = endHash;
|
||||||
doHash = false;
|
doHash = false;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue