fixed bad signature checking code for config files

This commit is contained in:
csoler 2018-10-05 16:54:36 +02:00
parent 6c4d1c34e3
commit 4de0498208
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
4 changed files with 50 additions and 12 deletions

View file

@ -34,6 +34,7 @@ std::string BinToHex(const 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);
bool HexToBin(const std::string& input,unsigned char *data, const uint32_t len);
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);