MCPcopy Create free account
hub / github.com/NativeScript/android / path_signature

Function path_signature

test-app/runtime/src/main/cpp/ada/ada.cpp:86–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 }();
85
86ada_really_inline constexpr uint8_t path_signature(
87 std::string_view input) noexcept {
88 // The path percent-encode set is the query percent-encode set and U+003F (?),
89 // U+0060 (`), U+007B ({), and U+007D (}). The query percent-encode set is the
90 // C0 control percent-encode set and U+0020 SPACE, U+0022 ("), U+0023 (#),
91 // U+003C (<), and U+003E (>). The C0 control percent-encode set are the C0
92 // controls and all code points greater than U+007E (~).
93 size_t i = 0;
94 uint8_t accumulator{};
95 for (; i + 7 < input.size(); i += 8) {
96 accumulator |= uint8_t(path_signature_table[uint8_t(input[i])] |
97 path_signature_table[uint8_t(input[i + 1])] |
98 path_signature_table[uint8_t(input[i + 2])] |
99 path_signature_table[uint8_t(input[i + 3])] |
100 path_signature_table[uint8_t(input[i + 4])] |
101 path_signature_table[uint8_t(input[i + 5])] |
102 path_signature_table[uint8_t(input[i + 6])] |
103 path_signature_table[uint8_t(input[i + 7])]);
104 }
105 for (; i < input.size(); i++) {
106 accumulator |= uint8_t(path_signature_table[uint8_t(input[i])]);
107 }
108 return accumulator;
109}
110
111ada_really_inline constexpr bool verify_dns_length(
112 std::string_view input) noexcept {

Callers 2

parse_prepared_pathFunction · 0.85
consume_prepared_pathMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected