From 65e7ad0e5b8c049b9614a528a0496c4e6eb9b0da Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 5 Sep 2013 19:28:10 +0000 Subject: [PATCH] pqihash now uses Sha1CheckSum git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6692 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/pqihash.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libretroshare/src/pqi/pqihash.h b/libretroshare/src/pqi/pqihash.h index acf56d290..d897cb452 100644 --- a/libretroshare/src/pqi/pqihash.h +++ b/libretroshare/src/pqi/pqihash.h @@ -30,6 +30,7 @@ #include #include #include "util/rsstring.h" +#include "retroshare/rstypes.h" #include 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;