| 36 | } |
| 37 | |
| 38 | std::string getEncryptDbgTraceKey(std::string_view prefix, |
| 39 | EncryptCipherDomainId domainId, |
| 40 | StringRef domainName, |
| 41 | Optional<EncryptCipherBaseKeyId> baseCipherId) { |
| 42 | // Construct the TraceEvent field key ensuring its uniqueness and compliance to TraceEvent field validator and log |
| 43 | // parsing tools |
| 44 | std::string dName = domainName.toString(); |
| 45 | // Underscores are invalid in trace event detail name. |
| 46 | boost::replace_all(dName, "_", "-"); |
| 47 | if (baseCipherId.present()) { |
| 48 | boost::format fmter("%s.%lld.%s.%llu"); |
| 49 | return boost::str(boost::format(fmter % prefix % domainId % dName % baseCipherId.get())); |
| 50 | } else { |
| 51 | boost::format fmter("%s.%lld.%s"); |
| 52 | return boost::str(boost::format(fmter % prefix % domainId % dName)); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | std::string getEncryptDbgTraceKeyWithTS(std::string_view prefix, |
| 57 | EncryptCipherDomainId domainId, |
no test coverage detected