Home
last modified time | relevance | path

Searched refs:array (Results 1 – 25 of 189) sorted by relevance

12345678

/system/bt/osi/src/
Darray.cc38 static bool grow(array_t* array);
45 array_t* array = static_cast<array_t*>( in array_new() local
48 array->element_size = element_size; in array_new()
49 array->capacity = INTERNAL_ELEMENTS; in array_new()
50 array->data = array->internal_storage; in array_new()
51 return array; in array_new()
54 void array_free(array_t* array) { in array_free() argument
55 if (!array) return; in array_free()
57 if (array->data != array->internal_storage) free(array->data); in array_free()
59 osi_free(array); in array_free()
[all …]
/system/bt/osi/test/
Darray_test.cc10 array_t* array = array_new(4); in TEST_F() local
11 ASSERT_TRUE(array != NULL); in TEST_F()
12 array_free(array); in TEST_F()
18 array_t* array = array_new(4); in TEST_F() local
19 EXPECT_DEATH(array_ptr(array), ""); in TEST_F()
20 array_free(array); in TEST_F()
24 array_t* array = array_new(4); in TEST_F() local
25 EXPECT_DEATH(array_at(array, 1), ""); in TEST_F()
26 array_free(array); in TEST_F()
30 array_t* array = array_new(sizeof(int)); in TEST_F() local
[all …]
/system/security/identity/
DCredentialData.cpp87 cppbor::Array array; in saveToDisk() local
88 array.add(sacp.id); in saveToDisk()
89 array.add(sacp.readerCertificate.encodedCertificate); in saveToDisk()
90 array.add(sacp.userAuthenticationRequired); in saveToDisk()
91 array.add(sacp.timeoutMillis); in saveToDisk()
92 array.add(sacp.secureUserId); in saveToDisk()
94 array.add(mac); in saveToDisk()
95 sacpArray.add(std::move(array)); in saveToDisk()
121 cppbor::Array array; in saveToDisk() local
122 array.add(data.certificate); in saveToDisk()
[all …]
/system/bt/osi/include/
Darray.h33 void array_free(array_t* array);
37 void* array_ptr(const array_t* array);
41 void* array_at(const array_t* array, size_t index);
44 size_t array_length(const array_t* array);
52 bool array_append_value(array_t* array, uint32_t value);
58 bool array_append_ptr(array_t* array, void* data);
/system/chre/util/include/chre/util/
Dmacros.h27 #define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) argument
28 #define ARRAY_END(array) (array + ARRAY_SIZE(array)) argument
/system/bt/gd/security/
Decdh_keys.cc35 static std::array<uint8_t, SIZE> GenerateRandom() { in GenerateRandom()
43 std::array<uint8_t, SIZE> r; in GenerateRandom()
53 std::pair<std::array<uint8_t, 32>, EcdhPublicKey> GenerateECDHKeyPair() { in GenerateECDHKeyPair()
54 std::array<uint8_t, 32> private_key = GenerateRandom<32>(); in GenerateECDHKeyPair()
55 std::array<uint8_t, 32> private_key_copy = private_key; in GenerateECDHKeyPair()
65 …return std::make_pair<std::array<uint8_t, 32>, EcdhPublicKey>(std::move(private_key), std::move(pk… in GenerateECDHKeyPair()
76 std::array<uint8_t, 32> ComputeDHKey(std::array<uint8_t, 32> my_private_key, EcdhPublicKey remote_p… in ComputeDHKey()
87 std::array<uint8_t, 32> dhkey; in ComputeDHKey()
Decdh_keys.h26 std::array<uint8_t, 32> x;
27 std::array<uint8_t, 32> y;
31 std::pair<std::array<uint8_t, 32>, EcdhPublicKey> GenerateECDHKeyPair();
37 std::array<uint8_t, 32> ComputeDHKey(std::array<uint8_t, 32> my_private_key, EcdhPublicKey remote_p…
/system/chre/util/tests/
Dheap_test.cc28 std::array<int, MaxSize> array; in TEST() local
29 std::array<int, MaxSize> array_sorted; in TEST()
32 array[i] = std::rand(); in TEST()
33 array_sorted[i] = array[i]; in TEST()
39 v.push_back(array[i]); in TEST()
69 std::array<int, MaxSize> array; in TEST() local
70 std::array<int, MaxSize> array_sorted; in TEST()
73 array[i] = std::rand(); in TEST()
74 array_sorted[i] = array[i]; in TEST()
79 v.push_back(array[i]); in TEST()
/system/connectivity/wificond/net/
Dmlme_event.h37 const std::array<uint8_t, ETH_ALEN>& GetBSSID() const { return bssid_; } in GetBSSID()
49 std::array<uint8_t, ETH_ALEN> bssid_;
61 const std::array<uint8_t, ETH_ALEN>& GetBSSID() const { return bssid_; } in GetBSSID()
73 std::array<uint8_t, ETH_ALEN> bssid_;
85 const std::array<uint8_t, ETH_ALEN>& GetBSSID() const { return bssid_; } in GetBSSID()
92 std::array<uint8_t, ETH_ALEN> bssid_;
107 std::array<uint8_t, ETH_ALEN> bssid_;
121 std::array<uint8_t, ETH_ALEN> bssid_;
/system/tools/aidl/tests/
Daidl_test_client_file_descriptors.cpp145 vector<unique_fd> array; in ConfirmFileDescriptorArrays() local
146 array.resize(2); in ConfirmFileDescriptorArrays()
148 if (!DoPipe(&array[0], &array[1])) { in ConfirmFileDescriptorArrays()
155 status = s->ReverseFileDescriptorArray(array, &repeated, &reversed); in ConfirmFileDescriptorArrays()
163 DoWrite(FdByName(array[1]), "First") && in ConfirmFileDescriptorArrays()
206 vector<unique_fd> array; in ConfirmParcelFileDescriptorArrays() local
207 array.resize(2); in ConfirmParcelFileDescriptorArrays()
209 if (!DoPipe(&array[0], &array[1])) { in ConfirmParcelFileDescriptorArrays()
214 for (auto& fd : array) { in ConfirmParcelFileDescriptorArrays()
/system/core/libutils/
DVectorImpl.cpp124 ssize_t VectorImpl::insertArrayAt(const void* array, size_t index, size_t length) in insertArrayAt() argument
130 _do_copy(where, array, length); in insertArrayAt()
135 ssize_t VectorImpl::appendArray(const void* array, size_t length) in appendArray() argument
137 return insertArrayAt(array, size(), length); in appendArray()
177 void* array = const_cast<void*>(arrayImpl()); in sort() local
181 void* item = reinterpret_cast<char*>(array) + mItemSize*(i); in sort()
182 void* curr = reinterpret_cast<char*>(array) + mItemSize*(i-1); in sort()
187 array = editArrayImpl(); in sort()
188 if (!array) return NO_MEMORY; in sort()
191 item = reinterpret_cast<char*>(array) + mItemSize*(i); in sort()
[all …]
/system/bt/gd/packet/parser/test/
Dtest_packets.pdl184 _count_(array) : 8,
185 array : TwoRelatedNumbers[],
190 array : TwoRelatedNumbers[4],
199 array : 8[3],
209 _count_(array) : 8,
210 array : TwoRelatedNumbers[],
215 _size_(array) : 8,
216 array : TwoRelatedNumbers[],
221 _count_(array) : 8,
222 array : TwoRelatedNumbers[],
[all …]
Dbig_endian_test_packets.pdl177 _count_(array) : 8,
178 array : TwoRelatedNumbersBe[],
187 array : 8[3],
197 _count_(array) : 8,
198 array : TwoRelatedNumbersBe[],
218 array : 8[],
237 array : 8[],
241 _size_(array): 8,
242 array : BitFieldBe[],
Dgenerated_packet_test.cc448 std::array<ForArrays, 5> fixed_array{ in TEST()
454 std::array<ForArrays, 5> copy_array(fixed_array); in TEST()
469 auto array = view.GetEnumArray(); in TEST() local
470 ASSERT_EQ(copy_array.size(), array.size()); in TEST()
472 ASSERT_EQ(array[i], copy_array[i]); in TEST()
515 auto array = view.GetEnumArray(); in TEST() local
516 ASSERT_EQ(copy_array.size(), array.size()); in TEST()
518 ASSERT_EQ(array[i], copy_array[i]); in TEST()
551 auto array = view.GetEnumArray(); in TEST() local
552 ASSERT_EQ(count_array.size(), array.size()); in TEST()
[all …]
/system/connectivity/wifilogd/tests/
Dmemory_reader_unittest.cpp31 constexpr std::array<uint8_t, 1> buffer{}; in TEST()
37 constexpr std::array<uint8_t, 0> buffer{}; in TEST()
48 constexpr std::array<uint8_t, 3> buffer{{1, 2, 3}}; in TEST()
62 constexpr std::array<uint8_t, 3> buffer{{1, 2, 3}}; in TEST()
110 constexpr std::array<uint8_t, 1024> buffer{}; in TEST()
116 constexpr std::array<uint8_t, 1024> buffer{}; in TEST()
122 constexpr std::array<uint8_t, 1024> buffer{}; in TEST()
131 constexpr std::array<uint8_t, 1> buffer{}; in TEST()
137 constexpr std::array<uint8_t, 0> buffer{}; in TEST()
143 constexpr std::array<uint8_t, 1024> buffer{}; in TEST()
[all …]
/system/bt/gd/security/test/
Decdh_keys_test.cc52 std::array<uint8_t, 32> dhkeya = ComputeDHKey(private_key_a, public_key_b); in TEST_F()
53 std::array<uint8_t, 32> dhkeyb = ComputeDHKey(private_key_b, public_key_a); in TEST_F()
77 …std::array<uint8_t, 32> private_key_a = {0x3E, 0xC8, 0x2A, 0x32, 0xB3, 0x75, 0x76, 0xBA, 0x7D, 0xB… in TEST_F()
88 …std::array<uint8_t, 32> private_key_b = {0xDD, 0x53, 0x84, 0x91, 0xC8, 0xFA, 0x4B, 0x45, 0xB2, 0xF… in TEST_F()
99 std::array<uint8_t, 32> dhkey; in TEST_F()
105 std::array<uint8_t, 32> dhkey_a = ComputeDHKey(private_key_a, public_key_b); in TEST_F()
106 std::array<uint8_t, 32> dhkey_b = ComputeDHKey(private_key_b, public_key_a); in TEST_F()
/system/chre/apps/test/chqts/src/shared/
Dnano_string_test.cc152 char array[kAsciiLen + 1]; in testHexAscii() local
153 array[kAsciiLen] = kUnsetValue; in testHexAscii()
154 uint32ToHexAscii(array, sizeof(array), value); in testHexAscii()
155 EXPECT_EQ(kUnsetValue, array[kAsciiLen]); in testHexAscii()
156 array[kAsciiLen] = '\0'; in testHexAscii()
157 EXPECT_STREQ(str, array); in testHexAscii()
/system/libhidl/
Dtest_main.cpp205 int32_t array[] = {5, 6, 7}; in TEST_F() local
206 vector<int32_t> v(array, array + 3); in TEST_F()
212 EXPECT_ARRAYEQ(hv1, array, 3); in TEST_F()
222 EXPECT_ARRAYEQ(v3, array, v3.size()); in TEST_F()
226 int32_t array[] = {5, 6, 7}; in TEST_F() local
227 android::hardware::hidl_vec<int32_t> hv1 = std::vector<int32_t>(array, array + 3); in TEST_F()
264 int32_t array[] = {5, 6, 7}; in TEST_F() local
265 hidl_vec<int32_t> hv1 = std::vector<int32_t>(array, array + 3); in TEST_F()
401 int32_t array[] = {5, 6, 7}; in TEST_F() local
403 hidl_array<int32_t, 3> ha(array); in TEST_F()
[all …]
/system/bt/gd/security/record/
Dsecurity_record.h63 void SetLinkKey(std::array<uint8_t, 16> link_key, hci::KeyType key_type) { in SetLinkKey()
73 std::array<uint8_t, 16> GetLinkKey() { in GetLinkKey()
91 std::array<uint8_t, 16> link_key_ = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
106 std::optional<std::array<uint8_t, 8>> rand;
/system/bt/gd/crypto_toolbox/
Dcrypto_toolbox.cc28 Octet16 h6(const Octet16& w, std::array<uint8_t, 4> keyid) { in h6()
42 std::array<uint8_t, msg_len> msg; in f4()
56 std::array<uint8_t, msg_len> msg; in calculate_mac_key_or_ltk()
99 std::array<uint8_t, msg_len> msg; in f6()
118 std::array<uint8_t, msg_len> msg; in g2()
138 constexpr std::array<uint8_t, 4> keyID_tmp1 = {0x31, 0x70, 0x6D, 0x74}; in ltk_to_link_key()
143 constexpr std::array<uint8_t, 4> keyID_lebr = {0x72, 0x62, 0x65, 0x6c}; in ltk_to_link_key()
155 constexpr std::array<uint8_t, 4> keyID_tmp2 = {0x32, 0x70, 0x6D, 0x74}; in link_key_to_ltk()
160 constexpr std::array<uint8_t, 4> keyID_brle = {0x65, 0x6c, 0x72, 0x62}; in link_key_to_ltk()
179 std::array<uint8_t, 4> padding{0}; in c1()
/system/connectivity/wificond/tests/
Dap_interface_impl_unittest.cpp36 using std::array;
54 const array<uint8_t, ETH_ALEN> kFakeMacAddress01 = {0x45, 0x54, 0xad, 0x67, 0x98, 0xf6};
55 const array<uint8_t, ETH_ALEN> kFakeMacAddress02 = {0x45, 0x54, 0xad, 0x67, 0x98, 0xf7};
107 array<uint8_t, ETH_ALEN> fake_mac_address_01 = kFakeMacAddress01; in TEST_F()
108 array<uint8_t, ETH_ALEN> fake_mac_address_02 = kFakeMacAddress02; in TEST_F()
129 array<uint8_t, ETH_ALEN> fake_mac_address_01 = kFakeMacAddress01; in TEST_F()
Dmock_client_interface_impl.cpp32 const std::array<uint8_t, ETH_ALEN> kTestInterfaceMacAddress = {0x10, 0x20, 0xfe, 0xae, 0x2d, 0xc2};
44 std::array<uint8_t, ETH_ALEN>(kTestInterfaceMacAddress), in MockClientInterfaceImpl()
/system/core/base/include/android-base/
Dmacros.h74 char(&ArraySizeHelper(T(&array)[N]))[N]; // NOLINT(readability/casting)
76 #define arraysize(array) (sizeof(ArraySizeHelper(array))) argument
/system/bt/stack/crypto_toolbox/
Dcrypto_toolbox.cc29 Octet16 h6(const Octet16& w, std::array<uint8_t, 4> keyid) { in h6()
46 std::array<uint8_t, msg_len> msg; in f4()
63 std::array<uint8_t, msg_len> msg; in calculate_mac_key_or_ltk()
114 std::array<uint8_t, msg_len> msg; in f6()
137 std::array<uint8_t, msg_len> msg; in g2()
162 constexpr std::array<uint8_t, 4> keyID_tmp1 = {0x31, 0x70, 0x6D, 0x74}; in ltk_to_link_key()
167 constexpr std::array<uint8_t, 4> keyID_lebr = {0x72, 0x62, 0x65, 0x6c}; in ltk_to_link_key()
179 constexpr std::array<uint8_t, 4> keyID_tmp2 = {0x32, 0x70, 0x6D, 0x74}; in link_key_to_ltk()
184 constexpr std::array<uint8_t, 4> keyID_brle = {0x65, 0x6c, 0x72, 0x62}; in link_key_to_ltk()
/system/core/libutils/include/utils/
DVector.h108 inline const TYPE* array() const;
144 ssize_t insertArrayAt(const TYPE* array, size_t index, size_t length);
147 ssize_t appendArray(const TYPE* array, size_t length);
204 inline const_iterator begin() const { return array(); } in begin()
205 inline const_iterator end() const { return array() + size(); } in end()
211 ssize_t index = removeItemsAt(static_cast<size_t>(pos-array())); in erase()
278 const TYPE* Vector<TYPE>::array() const { in array() function
293 return *(array() + index);
303 return *(array() + size() - 1); in top()
327 ssize_t Vector<TYPE>::insertArrayAt(const TYPE* array, size_t index, size_t length) { in insertArrayAt() argument
[all …]

12345678