38 if (type_hash ==
nullptr) {
42 static const char prefix[] =
"typehash=";
43 static const char suffix[] =
";";
44 const size_t hash_len = std::strlen(type_hash);
45 const size_t total_len =
sizeof(prefix) - 1u + hash_len +
sizeof(suffix) - 1u;
47 std::vector<uint8_t> payload;
48 payload.reserve(total_len);
49 for (
const char* p = prefix; *p; ++p) payload.push_back(
static_cast<uint8_t
>(*p));
50 for (
size_t i = 0u; i < hash_len; ++i) payload.push_back(
static_cast<uint8_t
>(type_hash[i]));
51 for (
const char* p = suffix; *p; ++p) payload.push_back(
static_cast<uint8_t
>(*p));