Home
last modified time | relevance | path

Searched refs:rand (Results 1 – 25 of 44) sorted by relevance

12

/system/bt/osi/src/
Dosi.cc36 int rand; in osi_rand() local
45 ssize_t read_bytes = read(rand_fd, &rand, sizeof(rand)); in osi_rand()
48 CHECK(read_bytes == sizeof(rand)); in osi_rand()
50 if (rand < 0) rand = -rand; in osi_rand()
52 return rand; in osi_rand()
/system/bt/stack/smp/
Dsmp_keys.cc111 void smp_proc_passkey(tSMP_CB* p_cb, BT_OCTET8 rand) { in smp_proc_passkey() argument
114 uint8_t* pp = rand; in smp_proc_passkey()
223 [](tSMP_CB* p_cb, BT_OCTET8 rand) { in smp_generate_csrk() argument
225 STREAM_TO_UINT16(div, rand); in smp_generate_csrk()
340 tSMP_STATUS smp_calculate_comfirm(tSMP_CB* p_cb, const Octet16& rand, in smp_calculate_comfirm() argument
356 smp_xor_128(&p1, rand); in smp_calculate_comfirm()
385 smp_debug_print_nbyte_little_endian(p_cb->rand.data(), "local_rand", 16); in smp_generate_confirm()
387 tSMP_STATUS status = smp_calculate_comfirm(p_cb, p_cb->rand, &output); in smp_generate_confirm()
421 [](tSMP_CB* p_cb, BT_OCTET8 rand) { in smp_generate_srand_mrand_confirm() argument
422 memcpy(p_cb->rand.data(), rand, 8); in smp_generate_srand_mrand_confirm()
[all …]
/system/bt/stack/btm/
Dbtm_ble_addr.cc101 return interval_min_ms + std::rand() % interval_random_part_max_ms; in btm_get_next_private_addrress_interval_ms()
114 static void btm_gen_non_resolve_paddr_cmpl(BT_OCTET8 rand) { in btm_gen_non_resolve_paddr_cmpl() argument
124 pp = rand; in btm_gen_non_resolve_paddr_cmpl()
183 uint8_t rand[3]; in rpa_matches_irk() local
184 rand[0] = rpa.address[2]; in rpa_matches_irk()
185 rand[1] = rpa.address[1]; in rpa_matches_irk()
186 rand[2] = rpa.address[0]; in rpa_matches_irk()
189 Octet16 x = crypto_toolbox::aes_128(irk, &rand[0], 3); in rpa_matches_irk()
191 rand[0] = rpa.address[5]; in rpa_matches_irk()
192 rand[1] = rpa.address[4]; in rpa_matches_irk()
[all …]
Dbtm_ble.cc1372 memcpy(p_rec->ble.keys.rand, p_keys->penc_key.rand, BT_OCTET8_LEN); in btm_sec_save_le_key()
1674 void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8], uint16_t ediv) { in btm_ble_ltk_request()
1682 memcpy(p_cb->enc_rand, rand, BT_OCTET8_LEN); in btm_ble_ltk_request()
1717 btsnd_hcic_ble_start_enc(p_rec->ble_hci_handle, p_rec->ble.keys.rand, in btm_ble_start_encrypt()
2431 btsnd_hcic_ble_rand(base::Bind([](BT_OCTET8 rand) { in btm_ble_reset_id() argument
2433 memcpy(tmp.rand1.data(), rand, BT_OCTET8_LEN); in btm_ble_reset_id()
2435 [](reset_id_data tmp, BT_OCTET8 rand) { in btm_ble_reset_id() argument
2436 memcpy(tmp.rand1.data() + 8, rand, BT_OCTET8_LEN); in btm_ble_reset_id()
2438 [](reset_id_data tmp, BT_OCTET8 rand) { in btm_ble_reset_id() argument
2439 memcpy(tmp.rand2.data(), rand, BT_OCTET8_LEN); in btm_ble_reset_id()
[all …]
Dbtm_ble_int.h88 extern void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8],
/system/security/keystore/tests/
Dconfirmationui_rate_limiting_test.cpp84 ASSERT_TRUE(rateLimiting.tryPrompt(rand())); in TEST()
106 uid_t id = rand(); in TEST()
124 uid_t id = rand(); in TEST()
142 uid_t id = rand(); in TEST()
161 uid_t id = rand(); in TEST()
175 uid_t id = rand(); in TEST()
192 uid_t id = rand(); in TEST()
209 uid_t id = rand(); in TEST()
253 uid_t id = rand(); in TEST()
/system/bt/vendor_libs/test_vendor_lib/model/devices/
Dbroken_adv.cc64 uint32_t randomness = rand(); in random_length()
87 uint32_t randomness = rand(); in random_adv_type()
100 uint32_t randomness = rand(); in random_data_length()
118 for (size_t i = 0; i < data_length; i++) ad.push_back(rand() & 0xff); in RandomizeAdvertisement()
/system/extras/mmap-perf/
DmmapPerf.cpp38 uint64_t seed = (unsigned long long)rand() | ((unsigned long long)rand() << 32); in fillPageJunk()
117 unsigned int targetPage = rand() % pagesTotal; in benchRandomRead()
127 unsigned int targetPage = rand() % pagesTotal; in benchRandomWrite()
/system/chre/util/tests/
Dheap_test.cc32 array[i] = std::rand(); in TEST()
73 array[i] = std::rand(); in TEST()
87 chre::remove_heap(v, std::rand() % s, comp); in TEST()
/system/extras/ioshark/
Dioshark_bench_mmap.c94 i = find_rand_index[rand() % rand_index_len]; in mmap_getnext_off_len()
96 iolength = ((rand() % 4) + 1) * 4096; in mmap_getnext_off_len()
130 if ((rand() % 2) == 1) { in mmap_do_io()
/system/netd/server/
DClatdControllerTest.cpp138 uint32_t rand = arc4random_uniform(0xffffffff); in TEST_F() local
139 uint16_t rand1 = rand & 0xffff; in TEST_F()
140 uint16_t rand2 = (rand >> 16) & 0xffff; in TEST_F()
/system/extras/verity/
Dbuild_verity_tree_test.cpp126 std::min<size_t>(rand() % 10 * 4096, data.size() - offset); in TEST_F()
148 size_t data_length = std::min<size_t>(rand() % 40960, data.size() - offset); in TEST_F()
170 size_t data_length = std::min<size_t>(rand() % 40960, data.size() - offset); in TEST_F()
/system/bt/gd/security/
Dpairing_handler_le.cc325 std::optional<std::array<uint8_t, 8>> rand; /* Legacy only */ in ReceiveKeys() local
348 rand = std::get<MasterIdentificationView>(packet).GetRand(); in ReceiveKeys()
385 …return DistributedKeys{ltk, ediv, rand, identity_address, identity_address_type, irk, signature_ke… in ReceiveKeys()
389 std::array<uint8_t, 8> rand, Octet16 irk, Address identity_address, in SendKeys() argument
395 SendL2capPacket(i, MasterIdentificationBuilder::Create(ediv, rand)); in SendKeys()
Dpairing_handler_le.h136 …tEncryption(const InitialInformations& i, uint16_t conn_handle, const std::array<uint8_t, 8>& rand, in SendHciLeStartEncryption() argument
138 …i.le_security_interface->EnqueueCommand(hci::LeStartEncryptionBuilder::Create(conn_handle, rand, e… in SendHciLeStartEncryption()
231 … std::array<uint8_t, 8> rand, Octet16 irk, Address identity_address, AddrType identity_addres_type,
472 for (size_t i = 0; i < SIZE; i++) r[i] = std::rand();
480 return std::rand();
Decdh_keys.cc44 for (size_t i = 0; i < SIZE; i++) r[i] = std::rand(); in GenerateRandom()
Dsmp_packets.pdl98 rand : 8[8],
/system/extras/zram-perf/
Dzram-perf.cpp20 uint32_t start = rand(); in fillPageRand()
26 uint32_t val = rand() & 0xfff; in fillPageCompressible()
/system/extras/tests/ext4/
Drand_emmc_perf.c126 if (lseek64(fd, (rand() % max_blocks) * TST_BLK_SIZE, SEEK_SET) < 0) { in stats_test()
156 if (lseek64(fd, (rand() % max_blocks) * TST_BLK_SIZE, SEEK_SET) < 0) { in perf_test()
/system/media/audio_utils/tests/
Dfifo_tests.cpp127 framesToWrite = rand() % (framesToWrite + 1); in main()
162 framesToRead = rand() % (framesToRead + 1); in main()
/system/bt/gd/security/record/
Dsecurity_record.h106 std::optional<std::array<uint8_t, 8>> rand; variable
/system/core/fs_mgr/libsnapshot/
Dtest_helpers.cpp91 unique_fd rand(open("/dev/urandom", O_RDONLY)); in WriteRandomData() local
102 ssize_t n = TEMP_FAILURE_RETRY(read(rand.get(), buf, sizeof(buf))); in WriteRandomData()
/system/core/trusty/libtrusty/tipc-test/
Dtipc_test.c366 msg_len = rand() % msgsz; in echo_test()
430 msg_len = rand() % msgsz; in burst_write_test()
750 msg_len = rand() % msgsz; in writev_test()
832 msg_len = rand() % msgsz; in readv_test()
/system/security/keystore/
Dgrant_store.cpp56 std::tie(iterator, success) = uid_grant_list.emplace(blobEntry, std::rand()); in put()
/system/tools/hidl/test/lazy_test/
Dhidl_lazy_test.cpp103 times[i] = (size_t)(rand() % (maxWait + 1)); in waitTimes()
/system/bt/stack/test/
Dstack_smp_test.cc90 extern tSMP_STATUS smp_calculate_comfirm(tSMP_CB* p_cb, const Octet16& rand,

12