| 353 | } |
| 354 | |
| 355 | std::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 | } |
| 366 | std::string OHDUtil::bytes_as_string(const uint8_t* data, int data_len) { |
| 367 | std::stringstream ss; |
| 368 | ss << "["; |