Home
last modified time | relevance | path

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

123456789

/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/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/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/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…
Dfacade_configuration_api.h52 …void GetOutOfBandData(std::array<uint8_t, 16>* le_sc_confirmation_value, std::array<uint8_t, 16>* …
55 std::array<uint8_t, 16> le_sc_confirmation_value,
56 std::array<uint8_t, 16> le_sc_random_value);
Dfacade_configuration_api.cc55 … std::array<uint8_t, 16>* le_sc_confirmation_value, std::array<uint8_t, 16>* le_sc_random_value) { in GetOutOfBandData()
61 std::array<uint8_t, 16> le_sc_confirmation_value, in SetOutOfBandData()
62 std::array<uint8_t, 16> le_sc_random_value) { in SetOutOfBandData()
/system/tools/aidl/tests/
Daidl_test_client_file_descriptors.cpp83 std::vector<unique_fd> array; in TEST_F() local
84 array.resize(2); in TEST_F()
85 DoPipe(&array[0], &array[1]); in TEST_F()
89 auto status = service->ReverseFileDescriptorArray(array, &repeated, &reversed); in TEST_F()
92 WriteStringToFd("First", array[1]); in TEST_F()
117 std::vector<unique_fd> array; in TEST_F() local
118 array.resize(2); in TEST_F()
119 DoPipe(&array[0], &array[1]); in TEST_F()
122 for (auto& fd : array) { in TEST_F()
/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()
68 std::array<int, MaxSize> array; in TEST() local
69 std::array<int, MaxSize> array_sorted; in TEST()
72 array[i] = std::rand(); in TEST()
73 array_sorted[i] = array[i]; in TEST()
78 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/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.cc452 std::array<ForArrays, 5> fixed_array{ in TEST()
458 std::array<ForArrays, 5> copy_array(fixed_array); in TEST()
473 auto array = view.GetEnumArray(); in TEST() local
474 ASSERT_EQ(copy_array.size(), array.size()); in TEST()
476 ASSERT_EQ(array[i], copy_array[i]); in TEST()
519 auto array = view.GetEnumArray(); in TEST() local
520 ASSERT_EQ(copy_array.size(), array.size()); in TEST()
522 ASSERT_EQ(array[i], copy_array[i]); in TEST()
555 auto array = view.GetEnumArray(); in TEST() local
556 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/chqts/src/shared/
Dnano_string_test.cc155 char array[kAsciiLen + 1]; in testHexAscii() local
156 array[kAsciiLen] = kUnsetValue; in testHexAscii()
157 uint32ToHexAscii(array, sizeof(array), value); in testHexAscii()
158 EXPECT_EQ(kUnsetValue, array[kAsciiLen]); in testHexAscii()
159 array[kAsciiLen] = '\0'; in testHexAscii()
160 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()
244 int32_t array[] = {5, 6, 7}; in TEST_F() local
245 android::hardware::hidl_vec<int32_t> hv1 = std::vector<int32_t>(array, array + 3); in TEST_F()
282 int32_t array[] = {5, 6, 7}; in TEST_F() local
283 hidl_vec<int32_t> hv1 = std::vector<int32_t>(array, array + 3); in TEST_F()
419 int32_t array[] = {5, 6, 7}; in TEST_F() local
421 hidl_array<int32_t, 3> ha(array); in TEST_F()
[all …]
/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};
105 array<uint8_t, ETH_ALEN> fake_mac_address_01 = kFakeMacAddress01; in TEST_F()
106 array<uint8_t, ETH_ALEN> fake_mac_address_02 = kFakeMacAddress02; in TEST_F()
137 array<uint8_t, ETH_ALEN> fake_mac_address_01 = kFakeMacAddress01; in TEST_F()
161 array<uint8_t, ETH_ALEN> fake_mac_address_01 = kFakeMacAddress01; in TEST_F()
162 array<uint8_t, ETH_ALEN> fake_mac_address_02 = kFakeMacAddress02; in TEST_F()
183 array<uint8_t, ETH_ALEN> fake_mac_address_01 = kFakeMacAddress01; in TEST_F()
/system/connectivity/wificond/
Dclient_interface_impl.h68 const std::array<uint8_t, ETH_ALEN>& interface_mac_addr,
79 const std::array<uint8_t, ETH_ALEN>& GetMacAddress();
82 bool SetMacAddress(const std::array<uint8_t, ETH_ALEN>& mac);
96 const std::array<uint8_t, ETH_ALEN> interface_mac_addr_;
106 std::array<uint8_t, ETH_ALEN> bssid_;
/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()
115 std::array<uint8_t, 16> link_key_ = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
133 std::optional<std::array<uint8_t, 8>> rand;
/system/libbase/include/android-base/
Dmacros.h74 char(&ArraySizeHelper(T(&array)[N]))[N]; // NOLINT(readability/casting)
76 #define arraysize(array) (sizeof(ArraySizeHelper(array))) argument
/system/bt/gd/crypto_toolbox/
Dcrypto_toolbox.cc30 Octet16 h6(const Octet16& w, std::array<uint8_t, 4> keyid) { in h6()
44 std::array<uint8_t, msg_len> msg; in f4()
65 std::array<uint8_t, msg_len> msg; in calculate_mac_key_or_ltk()
108 std::array<uint8_t, msg_len> msg; in f6()
127 std::array<uint8_t, msg_len> msg; in g2()
147 constexpr std::array<uint8_t, 4> keyID_tmp1 = {0x31, 0x70, 0x6D, 0x74}; in ltk_to_link_key()
152 constexpr std::array<uint8_t, 4> keyID_lebr = {0x72, 0x62, 0x65, 0x6c}; in ltk_to_link_key()
164 constexpr std::array<uint8_t, 4> keyID_tmp2 = {0x32, 0x70, 0x6D, 0x74}; in link_key_to_ltk()
169 constexpr std::array<uint8_t, 4> keyID_brle = {0x65, 0x6c, 0x72, 0x62}; in link_key_to_ltk()
195 std::array<uint8_t, 4> padding{0}; in c1()

123456789