Removed some std::ostringstream.

To be continued.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5103 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-04-14 22:38:24 +00:00
parent 60a68210d5
commit 83bd45caa4
22 changed files with 399 additions and 755 deletions

View file

@ -25,8 +25,8 @@
#include <openssl/sha.h>
#include <string>
#include <sstream>
#include <iomanip>
#include "util/rsstring.h"
class pqihash
{
@ -66,13 +66,11 @@ void Complete(std::string &hash)
SHA1_Final(sha_hash, sha_ctx);
std::ostringstream out;
endHash.clear();
for(int i = 0; i < SHA_DIGEST_LENGTH; i++)
{
out << std::setw(2) << std::setfill('0') << std::hex;
out << (unsigned int) (sha_hash[i]);
rs_sprintf_append(endHash, "%02x", (unsigned int) (sha_hash[i]));
}
endHash = out.str();
hash = endHash;
doHash = false;