Searched refs:buf_ptr (Results 1 - 10 of 10) sorted by relevance

/system/keymaster/
H A Dauth_encrypted_key_blob.cpp63 const uint8_t** buf_ptr = &tmp; local
69 if (!copy_from_buf(buf_ptr, end, nonce->peek_write(), OCB_NONCE_LENGTH) ||
70 !encrypted_key_material->Deserialize(buf_ptr, end) ||
71 !copy_from_buf(buf_ptr, end, tag->peek_write(), OCB_TAG_LENGTH) ||
72 !hw_enforced->Deserialize(buf_ptr, end) || //
73 !sw_enforced->Deserialize(buf_ptr, end)) {
91 const uint8_t** buf_ptr = &tmp; local
94 if (end <= *buf_ptr)
97 uint8_t version = *(*buf_ptr)++;
99 !nonce->Deserialize(buf_ptr, en
[all...]
H A Dandroid_keymaster_messages.cpp41 static bool deserialize_key_blob(keymaster_key_blob_t* key_blob, const uint8_t** buf_ptr, argument
46 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_blob->key_material_size,
67 bool KeymasterResponse::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { argument
68 if (!copy_uint32_from_buf(buf_ptr, end, &error))
72 return NonErrorDeserialize(buf_ptr, end);
89 bool GenerateKeyResponse::NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { argument
90 return deserialize_key_blob(&key_blob, buf_ptr, end) && enforced.Deserialize(buf_ptr, end) &&
91 unenforced.Deserialize(buf_ptr, end);
111 bool GetKeyCharacteristicsRequest::Deserialize(const uint8_t** buf_ptr, cons argument
125 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
145 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
165 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
187 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
224 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
264 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
288 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
303 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
324 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
350 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
370 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
390 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
412 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
431 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
459 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
509 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
543 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
560 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
[all...]
H A Dserializable.cpp38 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size) { argument
39 if (__pval(*buf_ptr) + size < __pval(*buf_ptr)) // Pointer wrap check
42 if (end < *buf_ptr + size)
44 memcpy(dest, *buf_ptr, size);
45 *buf_ptr += size;
49 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size, argument
51 if (!copy_uint32_from_buf(buf_ptr, end, size))
54 if (__pval(*buf_ptr) + *size < __pval(*buf_ptr)) // Pointe
146 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
[all...]
H A Dauthorization_set.cpp340 static bool deserialize(keymaster_key_param_t* param, const uint8_t** buf_ptr, const uint8_t* end, argument
342 if (!copy_uint32_from_buf(buf_ptr, end, &param->tag))
350 return copy_uint32_from_buf(buf_ptr, end, &param->enumerated);
353 return copy_uint32_from_buf(buf_ptr, end, &param->integer);
356 return copy_uint64_from_buf(buf_ptr, end, &param->long_integer);
358 return copy_uint64_from_buf(buf_ptr, end, &param->date_time);
361 if (*buf_ptr < end) {
362 param->boolean = static_cast<bool>(**buf_ptr);
363 (*buf_ptr)++;
371 if (!copy_uint32_from_buf(buf_ptr, en
412 DeserializeIndirectData(const uint8_t** buf_ptr, const uint8_t* end) argument
423 DeserializeElementsData(const uint8_t** buf_ptr, const uint8_t* end) argument
459 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument
[all...]
H A Dandroid_keymaster_messages_test.cpp57 bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) { argument
58 if (*buf_ptr >= end)
60 EXPECT_EQ(0, **buf_ptr);
61 (*buf_ptr)++;
/system/keymaster/include/keymaster/
H A Dserializable.h52 virtual bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0;
136 * Copy \p size bytes from \p *buf_ptr into \p dest. If there are fewer than \p size bytes to read,
137 * returns false. Advances *buf_ptr to the next byte to be read.
139 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size);
142 * Extracts a uint32_t size from *buf_ptr, placing it in \p *size, and then reads *size bytes from
143 * *buf_ptr, placing them in newly-allocated storage in *dest. If there aren't enough bytes in
144 * *buf_ptr, returns false. Advances \p *buf_ptr to the next byte to be read.
148 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size,
152 * Copies a value convertible from uint32_t from \p *buf_ptr
156 copy_uint32_from_buf(const uint8_t** buf_ptr, const uint8_t* end, T* value) argument
168 copy_uint64_from_buf(const uint8_t** buf_ptr, const uint8_t* end, uint64_t* value) argument
179 copy_uint32_array_from_buf(const uint8_t** buf_ptr, const uint8_t* end, UniquePtr<T[]>* data, size_t* count) argument
[all...]
H A Dandroid_keymaster_messages.h112 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override;
116 virtual bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0;
127 bool Deserialize(const uint8_t** /* buf_ptr */, const uint8_t* /* end */) override {
139 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override {
140 return copy_uint32_from_buf(buf_ptr, end, &algorithm);
165 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override {
166 return copy_uint32_from_buf(buf_ptr, end, &algorithm) &&
167 copy_uint32_from_buf(buf_ptr, end, &purpose);
214 bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) override {
218 if (!copy_uint32_array_from_buf(buf_ptr, en
[all...]
H A Dandroid_keymaster_utils.h293 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { argument
296 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_material_size, &tmp)) {
H A Dauthorization_set.h425 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end);
439 bool DeserializeIndirectData(const uint8_t** buf_ptr, const uint8_t* end);
440 bool DeserializeElementsData(const uint8_t** buf_ptr, const uint8_t* end);
/system/core/libprocessgroup/
H A Dprocessgroup.cpp68 char *buf_ptr; member in struct:ctx
120 ctx->buf_ptr = ctx->buf;
131 memmove(ctx->buf, ctx->buf_ptr, ctx->buf_len);
132 ctx->buf_ptr = ctx->buf;
134 ssize_t ret = read(ctx->fd, ctx->buf_ptr + ctx->buf_len,
161 while ((eptr = (char *)memchr(ctx->buf_ptr, '\n', ctx->buf_len)) == NULL) {
174 long pid = strtol(ctx->buf_ptr, &pid_eptr, 10);
182 ctx->buf_len -= (eptr - ctx->buf_ptr) + 1;
183 ctx->buf_ptr = eptr + 1;

Completed in 142 milliseconds