MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / password_as_hidden_str

Method password_as_hidden_str

OpenHD/ohd_common/src/openhd_util.cpp:355–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355std::string OHDUtil::password_as_hidden_str(const std::string& pw) {
356 // Show first character and * for the rest
357 std::stringstream ss;
358 for (int i = 0; i < pw.size(); i++) {
359 if (i == 0)
360 ss << pw[i];
361 else
362 ss << "*";
363 }
364 return ss.str();
365}
366std::string OHDUtil::bytes_as_string(const uint8_t* data, int data_len) {
367 std::stringstream ss;
368 ss << "[";

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected