lib/base: Make to_hex() easier to use

This commit is contained in:
Povilas Kanapickas
2021-11-01 02:52:31 +02:00
parent 7f71924a86
commit 96e0021572
4 changed files with 6 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ std::string format_ssl_fingerprint(const std::string& fingerprint, bool hex, boo
std::string result = fingerprint;
if (hex) {
// to hexadecimal
barrier::string::toHex(result, 2);
result = barrier::string::to_hex(result, 2);
}
// all uppercase
@@ -36,4 +36,5 @@ std::string format_ssl_fingerprint(const std::string& fingerprint, bool hex, boo
result.insert(i * 3 - 1, ":");
}
}
return result;
}