mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-03 11:54:30 -04:00
added an additional param to BinToHex so as to limit the size of the output
This commit is contained in:
parent
5ffb54929c
commit
9c391cb015
2 changed files with 9 additions and 3 deletions
|
@ -36,7 +36,10 @@ 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);
|
||||
|
||||
// proxy function. When max_len>0 and len>max_len, only the first "max_len" bytes are writen to the string and "..." is happened.
|
||||
|
||||
std::string BinToHex(const unsigned char *arr, const uint32_t len, uint32_t max_len=0);
|
||||
std::string NumberToString(uint64_t n, bool hex=false);
|
||||
std::string HashId(const std::string &id, bool reverse = false);
|
||||
std::vector<uint8_t> BinToSha256(const std::vector<uint8_t> &in);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue