Home
last modified time | relevance | path

Searched refs:end (Results 1 – 25 of 113) sorted by relevance

12345

/system/keymaster/
Dgoogle_keymaster_messages.cpp29 uint8_t* KeymasterResponse::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
30 buf = append_uint32_to_buf(buf, end, static_cast<uint32_t>(error)); in Serialize()
32 buf = NonErrorSerialize(buf, end); in Serialize()
36 bool KeymasterResponse::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
37 if (!copy_uint32_from_buf(buf_ptr, end, &error)) in Deserialize()
41 return NonErrorDeserialize(buf_ptr, end); in Deserialize()
48 uint8_t* SupportedAlgorithmsResponse::NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
49 return append_uint32_array_to_buf(buf, end, algorithms, algorithms_length); in NonErrorSerialize()
52 bool SupportedAlgorithmsResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize() argument
56 if (!copy_uint32_array_from_buf(buf_ptr, end, &deserialized_algorithms, &algorithms_length)) in NonErrorDeserialize()
[all …]
Dkey_blob_test.cpp90 uint8_t* end = begin + size; in TEST_F() local
91 EXPECT_EQ(end, std::search(begin, end, key_data, key_data + array_size(key_data))); in TEST_F()
121 uint8_t* end = begin + size; in TEST_F() local
122 auto nonce_ptr = std::search(begin, end, nonce, nonce + array_size(nonce)); in TEST_F()
123 ASSERT_NE(nonce_ptr, end); in TEST_F()
124 EXPECT_EQ(end, std::search(nonce_ptr + 1, end, nonce, nonce + array_size(nonce))); in TEST_F()
141 uint8_t* end = begin + size; in TEST_F() local
142 auto tag_ptr = std::search(begin, end, blob_->tag(), blob_->tag() + KeyBlob::TAG_LENGTH); in TEST_F()
143 ASSERT_NE(tag_ptr, end); in TEST_F()
144 EXPECT_EQ(end, std::search(tag_ptr + 1, end, blob_->tag(), blob_->tag() + KeyBlob::TAG_LENGTH)); in TEST_F()
[all …]
Dserializable.cpp22 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len) { in append_to_buf() argument
23 if (buf + data_len <= end) in append_to_buf()
28 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size) { in copy_from_buf() argument
29 if (end < *buf_ptr + size) in copy_from_buf()
36 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size, in copy_size_and_data_from_buf() argument
38 if (!copy_uint32_from_buf(buf_ptr, end, size) || *buf_ptr + *size > end) { in copy_size_and_data_from_buf()
48 return copy_from_buf(buf_ptr, end, dest->get(), *size); in copy_size_and_data_from_buf()
118 uint8_t* Buffer::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
119 return append_size_and_data_to_buf(buf, end, peek_read(), available_read()); in Serialize()
122 bool Buffer::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
[all …]
Dauthorization_set.cpp243 static uint8_t* serialize(const keymaster_key_param_t& param, uint8_t* buf, const uint8_t* end, in serialize() argument
245 buf = append_uint32_to_buf(buf, end, param.tag); in serialize()
251 buf = append_uint32_to_buf(buf, end, param.enumerated); in serialize()
255 buf = append_uint32_to_buf(buf, end, param.integer); in serialize()
258 buf = append_uint64_to_buf(buf, end, param.long_integer); in serialize()
261 buf = append_uint64_to_buf(buf, end, param.date_time); in serialize()
264 if (buf < end) in serialize()
270 buf = append_uint32_to_buf(buf, end, param.blob.data_length); in serialize()
271 buf = append_uint32_to_buf(buf, end, param.blob.data - indirect_base); in serialize()
277 static bool deserialize(keymaster_key_param_t* param, const uint8_t** buf_ptr, const uint8_t* end, in deserialize() argument
[all …]
Dkey_blob.cpp120 uint8_t* KeyBlob::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
122 buf = append_to_buf(buf, end, nonce(), NONCE_LENGTH); in Serialize()
123 buf = append_size_and_data_to_buf(buf, end, encrypted_key_material(), key_material_length()); in Serialize()
124 buf = append_to_buf(buf, end, tag(), TAG_LENGTH); in Serialize()
125 buf = enforced_.Serialize(buf, end); in Serialize()
126 buf = unenforced_.Serialize(buf, end); in Serialize()
131 bool KeyBlob::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
133 if (!copy_from_buf(buf_ptr, end, nonce_.get(), NONCE_LENGTH) || in Deserialize()
134 !copy_size_and_data_from_buf(buf_ptr, end, &key_material_length_, &tmp_key_ptr) || in Deserialize()
135 !copy_from_buf(buf_ptr, end, tag_.get(), TAG_LENGTH) || in Deserialize()
[all …]
/system/keymaster/include/keymaster/
Dgoogle_keymaster_messages.h45 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const;
46 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end);
49 virtual uint8_t* NonErrorSerialize(uint8_t* buf, const uint8_t* end) const = 0;
50 virtual bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0;
60 uint8_t* NonErrorSerialize(uint8_t* buf, const uint8_t* end) const;
61 bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end);
86 uint8_t* NonErrorSerialize(uint8_t* buf, const uint8_t* end) const { in NonErrorSerialize()
87 return append_uint32_array_to_buf(buf, end, results, results_length); in NonErrorSerialize()
89 bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { in NonErrorDeserialize()
93 if (!copy_uint32_array_from_buf(buf_ptr, end, &tmp, &results_length)) in NonErrorDeserialize()
[all …]
Dserializable.h45 virtual uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const = 0;
51 virtual bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0;
70 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len);
79 inline uint8_t* append_uint32_to_buf(uint8_t* buf, const uint8_t* end, T value) { in append_uint32_to_buf() argument
81 return append_to_buf(buf, end, &val, sizeof(val)); in append_uint32_to_buf()
87 inline uint8_t* append_uint64_to_buf(uint8_t* buf, const uint8_t* end, uint64_t value) { in append_uint64_to_buf() argument
88 return append_to_buf(buf, end, &value, sizeof(value)); in append_uint64_to_buf()
97 inline uint8_t* append_size_and_data_to_buf(uint8_t* buf, const uint8_t* end, const void* data, in append_size_and_data_to_buf() argument
99 buf = append_uint32_to_buf(buf, end, data_len); in append_size_and_data_to_buf()
100 return append_to_buf(buf, end, data, data_len); in append_size_and_data_to_buf()
[all …]
/system/core/libcutils/
Dcpu_info.c32 char* chp, *end; in get_cpu_serial_number() local
55 end = chp; in get_cpu_serial_number()
56 while (*end && *end != ' ' && *end != '\t' && *end != '\n' && *end != '\r') in get_cpu_serial_number()
57 ++end; in get_cpu_serial_number()
58 *end = 0; in get_cpu_serial_number()
Dtrace.c68 char* end = strchr(start, ','); in atrace_is_cmdline_match() local
70 if (end != NULL) { in atrace_is_cmdline_match()
71 *end = '\0'; in atrace_is_cmdline_match()
72 end++; in atrace_is_cmdline_match()
79 start = end; in atrace_is_cmdline_match()
/system/core/run-as/
Dpackage.c281 skip_spaces(const char* p, const char* end) in skip_spaces() argument
283 while (p < end && is_space(*p)) in skip_spaces()
293 skip_non_spaces(const char* p, const char* end) in skip_non_spaces() argument
295 while (p < end && !is_space(*p)) in skip_non_spaces()
305 find_first(const char* p, const char* end, char ch) in find_first() argument
307 while (p < end && *p != ch) in find_first()
320 compare_name(const char* p, const char* end, const char* name) in compare_name() argument
323 if (name == NULL || name[0] == '\0' || p == end) in compare_name()
331 if (p >= end || is_space(*p)) in compare_name()
342 if (p < end && !is_space(*p)) in compare_name()
[all …]
/system/netd/server/
DUidRanges.cpp24 auto iter = std::lower_bound(mRanges.begin(), mRanges.end(), Range(uid, uid)); in hasUid()
25 return (iter != mRanges.end() && iter->first == uid) || in hasUid()
70 std::sort(mRanges.begin(), mRanges.end()); in parseFrom()
75 auto middle = mRanges.insert(mRanges.end(), other.mRanges.begin(), other.mRanges.end()); in add()
76 std::inplace_merge(mRanges.begin(), middle, mRanges.end()); in add()
80 auto end = std::set_difference(mRanges.begin(), mRanges.end(), other.mRanges.begin(), in remove() local
81 other.mRanges.end(), mRanges.begin()); in remove()
82 mRanges.erase(end, mRanges.end()); in remove()
DPppController.cpp45 for (it = mTtys->begin(); it != mTtys->end(); ++it) { in ~PppController()
63 for (it = mTtys->begin(); it != mTtys->end(); ++it) { in attachPppd()
68 if (it == mTtys->end()) { in attachPppd()
128 for (it = mTtys->begin(); it != mTtys->end(); ++it) { in updateTtyList()
/system/core/libbacktrace/
Dmap_info.c37 unsigned long int end; in parse_vmmap_line() local
41 &start, &end, permissions, &name_pos) != 3) { in parse_vmmap_line()
51 mi->end = end; in parse_vmmap_line()
59 mi->start, mi->end, in parse_vmmap_line()
98 unsigned long int end; in parse_maps_line() local
101 if (sscanf(line, "%lx-%lx %4s %*x %*x:%*x %*d%n", &start, &end, in parse_maps_line()
118 mi->end = end; in parse_maps_line()
126 mi->start, mi->end, in parse_maps_line()
169 while (mi && !(addr >= mi->start && addr < mi->end)) { in backtrace_find_map_info()
DBacktraceMap.cpp42 it != end(); ++it) { in Find()
43 if (addr >= it->start && addr < it->end) { in Find()
52 unsigned long int end; local
62 &start, &end, permissions, &name_pos) != 3) {
69 &start, &end, permissions, &name_pos) != 3) {
75 map->end = end;
96 reinterpret_cast<void*>(map->start), reinterpret_cast<void*>(map->end),
DUnwindMap.cpp53 map.end = unw_map.end; in GenerateMap()
93 map.end = unw_map.end; in GenerateMap()
/system/core/libutils/
DTokenizer.cpp119 const char* end = getEnd(); in peekRemainderOfLine() local
121 while (eol != end) { in peekRemainderOfLine()
135 const char* end = getEnd(); in nextToken() local
137 while (mCurrent != end) { in nextToken()
151 const char* end = getEnd(); in nextLine() local
152 while (mCurrent != end) { in nextLine()
165 const char* end = getEnd(); in skipDelimiters() local
166 while (mCurrent != end) { in skipDelimiters()
DPropertyMap.cpp84 char* end; in tryGetProperty() local
85 int value = strtol(stringValue.string(), & end, 10); in tryGetProperty()
86 if (*end != '\0') { in tryGetProperty()
101 char* end; in tryGetProperty() local
102 float value = strtof(stringValue.string(), & end); in tryGetProperty()
103 if (*end != '\0') { in tryGetProperty()
/system/core/include/backtrace/
DBacktraceMap.h37 uintptr_t end; member
70 iterator end() { return maps_.end(); } in end() function
74 const_iterator end() const { return maps_.end(); } in end() function
/system/core/logd/
DLogWhiteBlackList.cpp57 for (it = mNice.begin(); it != mNice.end();) { in ~PruneList()
61 for (it = mNaughty.begin(); it != mNaughty.end();) { in ~PruneList()
70 for (it = mNice.begin(); it != mNice.end();) { in init()
74 for (it = mNaughty.begin(); it != mNaughty.end();) { in init()
142 while (it != list->end()) { in init()
163 if (it == list->end()) { in init()
192 for (it = mNice.begin(); it != mNice.end(); ++it) { in format()
204 for (it = mNaughty.begin(); it != mNaughty.end(); ++it) { in format()
223 for (it = mNaughty.begin(); it != mNaughty.end(); ++it) { in naughty()
233 for (it = mNice.begin(); it != mNice.end(); ++it) { in nice()
DLogBuffer.cpp148 LogBufferElementCollection::iterator it = mLogElements.end(); in log()
174 if (last == mLogElements.end()) { in log()
177 log_time end = log_time::EPOCH; in log() local
184 while(t != mTimes.end()) { in log()
191 if (!end_set || (end <= entry->mEnd)) { in log()
192 end = entry->mEnd; in log()
200 || (end_set && (end >= (*last)->getMonotonicTime()))) { in log()
242 while(t != mTimes.end()) { in prune()
254 for(it = mLogElements.begin(); it != mLogElements.end();) { in prune()
296 if (iu != l.end()) { in prune()
[all …]
DLogStatistics.cpp123 for (it = begin(); it != end();) { in ~UidStatistics()
136 for (last = it = begin(); it != end(); last = it, ++it) { in add()
159 for (it = begin(); it != end(); ++it) { in subtract()
167 it = end(); in subtract()
169 if (it == end()) { in subtract()
190 if (it != end()) { in sort()
193 while (++it != end()) { in sort()
215 for (it = begin(); it != end(); ++it) { in sizes()
230 for (it = begin(); it != end(); ++it) { in elements()
242 for (it = begin(); it != end(); ++it) { in sizesTotal()
[all …]
/system/extras/tests/ext4/
Drand_emmc_perf.c40 struct timeval end; member
73 timersub(&stats_buf[i].end, &stats_buf[i].start, &t); in print_stats()
100 timersub(&stats_buf[i].end, &stats_buf[i].start, &t); /* Xi */ in print_stats()
140 gettimeofday(&stats_buf[i].end, NULL); in stats_test()
148 struct timeval start, end, res; in perf_test() local
169 gettimeofday(&end, NULL); in perf_test()
170 timersub(&end, &start, &res); in perf_test()
176 gettimeofday(&end, NULL); in perf_test()
177 timersub(&end, &start, &res); in perf_test()
/system/core/libsparse/
Dsimg_dump.py106 end=" ")
114 print("Raw data", end="")
119 % (data_sz), end="")
130 print("Don't care", end="")
134 % (data_sz), end="")
141 print("Unknown chunk type 0x%04X" % (chunk_type), end="")
Dbacked_block.c146 struct backed_block *end) in backed_block_list_move() argument
154 if (!end) { in backed_block_list_move()
155 for (end = start; end && end->next; end = end->next) in backed_block_list_move()
159 if (start == NULL || end == NULL) { in backed_block_list_move()
166 from->data_blocks = end->next; in backed_block_list_move()
170 bb->next = end->next; in backed_block_list_move()
178 end->next = NULL; in backed_block_list_move()
182 end->next = bb->next; in backed_block_list_move()
/system/media/camera/tests/
Dcamera_metadata_tests_fake_vendor.h163 unsigned int start, end; in get_fakevendor_tag_count() local
169 end = fakevendor_section_bounds[section][1]; in get_fakevendor_tag_count()
170 count += end - start; in get_fakevendor_tag_count()
177 unsigned int start, end, tag; in get_fakevendor_tags() local
182 end = fakevendor_section_bounds[section][1]; in get_fakevendor_tags()
183 for (tag = start; tag < end; tag++) { in get_fakevendor_tags()

12345