mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-10 08:21:40 +08:00
lib/base: Make to_hex() easier to use
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user