added backend for distant message and distant chat filtering based on contact list

This commit is contained in:
csoler 2015-12-25 22:37:06 -05:00
parent f5c2aa31e3
commit 140205108a
20 changed files with 373 additions and 180 deletions

View file

@ -27,6 +27,7 @@
#include "util/rsprint.h"
#include "util/rsstring.h"
#include <iomanip>
#include <sstream>
#include <openssl/sha.h>
#include <sys/time.h>
@ -35,6 +36,15 @@
#include <sys/timeb.h>
#endif
std::string RsUtil::NumberToString(uint64_t n)
{
std::ostringstream os ;
os << n ;
os.flush() ;
return os.str();
}
std::string RsUtil::BinToHex(const std::string &bin)
{
return BinToHex(bin.c_str(), bin.length());

View file

@ -36,6 +36,7 @@ namespace RsUtil {
std::string BinToHex(const std::string &bin);
std::string BinToHex(const char *arr, const uint32_t len);
std::string BinToHex(const unsigned char *arr, const uint32_t len);
std::string NumberToString(uint64_t n);
std::string HashId(const std::string &id, bool reverse = false);
//std::string AccurateTimeString();