/system/keymaster/ |
H A D | auth_encrypted_key_blob.cpp | 63 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 D | android_keymaster_messages.cpp | 41 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 D | serializable.cpp | 38 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 D | authorization_set.cpp | 366 static bool deserialize(keymaster_key_param_t* param, const uint8_t** buf_ptr, const uint8_t* end, argument 368 if (!copy_uint32_from_buf(buf_ptr, end, ¶m->tag)) 376 return copy_uint32_from_buf(buf_ptr, end, ¶m->enumerated); 379 return copy_uint32_from_buf(buf_ptr, end, ¶m->integer); 382 return copy_uint64_from_buf(buf_ptr, end, ¶m->long_integer); 384 return copy_uint64_from_buf(buf_ptr, end, ¶m->date_time); 387 if (*buf_ptr < end) { 388 param->boolean = static_cast<bool>(**buf_ptr); 389 (*buf_ptr)++; 397 if (!copy_uint32_from_buf(buf_ptr, en 438 DeserializeIndirectData(const uint8_t** buf_ptr, const uint8_t* end) argument 449 DeserializeElementsData(const uint8_t** buf_ptr, const uint8_t* end) argument 485 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument [all...] |
H A D | android_keymaster_messages_test.cpp | 57 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 D | serializable.h | 53 virtual bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0; 137 * Copy \p size bytes from \p *buf_ptr into \p dest. If there are fewer than \p size bytes to read, 138 * returns false. Advances *buf_ptr to the next byte to be read. 140 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size); 143 * Extracts a uint32_t size from *buf_ptr, placing it in \p *size, and then reads *size bytes from 144 * *buf_ptr, placing them in newly-allocated storage in *dest. If there aren't enough bytes in 145 * *buf_ptr, returns false. Advances \p *buf_ptr to the next byte to be read. 149 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size, 153 * Copies a value convertible from uint32_t from \p *buf_ptr 157 copy_uint32_from_buf(const uint8_t** buf_ptr, const uint8_t* end, T* value) argument 169 copy_uint64_from_buf(const uint8_t** buf_ptr, const uint8_t* end, uint64_t* value) argument 180 copy_uint32_array_from_buf(const uint8_t** buf_ptr, const uint8_t* end, UniquePtr<T[]>* data, size_t* count) argument [all...] |
H A D | android_keymaster_messages.h | 113 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override; 117 virtual bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0; 128 bool Deserialize(const uint8_t** /* buf_ptr */, const uint8_t* /* end */) override { 140 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override { 141 return copy_uint32_from_buf(buf_ptr, end, &algorithm); 166 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override { 167 return copy_uint32_from_buf(buf_ptr, end, &algorithm) && 168 copy_uint32_from_buf(buf_ptr, end, &purpose); 215 bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) override { 219 if (!copy_uint32_array_from_buf(buf_ptr, en [all...] |
H A D | android_keymaster_utils.h | 298 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { argument 301 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_material_size, &tmp)) {
|
H A D | authorization_set.h | 437 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end); 451 bool DeserializeIndirectData(const uint8_t** buf_ptr, const uint8_t* end); 452 bool DeserializeElementsData(const uint8_t** buf_ptr, const uint8_t* end);
|
/system/chre/apps/wifi_offload/ |
H A D | utility.cc | 101 char *buf_ptr = ssid_hex_buffer; local 103 buf_ptr += std::sprintf(buf_ptr, "%02" PRIx8 ":", ssid[i]); 105 buf_ptr[-1] = '\0';
|
/system/core/libion/tests/ |
H A D | device_test.cpp | 518 auto buf_ptr = std::make_unique<char[]>(4096); local 519 void *buf = buf_ptr.get();
|