MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / GetContentId

Function GetContentId

Goldleaf/source/util/util_String.cpp:94–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 NcmContentId GetContentId(const std::string &cnt_id_str) {
95 NcmContentId cnt_id = {};
96 char lower[0x20] = {0};
97 char upper[0x20] = {0};
98 memcpy(lower, cnt_id_str.c_str(), 0x10);
99 memcpy(upper, cnt_id_str.c_str() + 0x10, 0x10);
100 *(u64*)cnt_id.c = __bswap64(strtoul(lower, nullptr, 0x10));
101 *(u64*)(cnt_id.c + 0x8) = __bswap64(strtoul(upper, nullptr, 0x10));
102 return cnt_id;
103 }
104
105 std::string JoinVector(const std::vector<std::string> &vec, const std::string &delim) {
106 std::string result;

Callers 1

PrepareInstallationMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected