MCPcopy Create free account
hub / github.com/apache/trafficserver / hexToStream

Function hexToStream

include/tscore/Extendible.h:247–256  ·  view source on GitHub ↗

///////////////////////////////////////////////// HexToString function for serializing untyped C storage TODO: use swoc::bwf::As_Hex() after PR goes through

Source from the content-addressed store, hash-verified

245/// HexToString function for serializing untyped C storage
246// TODO: use swoc::bwf::As_Hex() after PR goes through
247inline void
248hexToStream(std::ostream &os, void const *buf, uint16_t size)
249{
250 static const char hexDigits[] = "0123456789abcdef";
251
252 const uint8_t *src = static_cast<const uint8_t *>(buf);
253 for (int i = 0; i < size; i++) {
254 os << hexDigits[src[i]];
255 }
256};
257
258template <typename Field_t>
259void

Callers 1

makeFieldIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected