Home
last modified time | relevance | path

Searched refs:rand (Results 1 – 25 of 35) 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 …]
Dsmp_utils.cc513 ARRAY_TO_STREAM(p, p_cb->rand, OCTET16_LEN); in smp_build_rand_cmd()
1485 memset(ple_key.penc_key.rand, 0, BT_OCTET8_LEN); in smp_save_secure_connections_long_term_key()
1506 na = p_cb->rand; in smp_calculate_f5_mackey_and_long_term_key()
1512 nb = p_cb->rand; in smp_calculate_f5_mackey_and_long_term_key()
/system/bt/stack/btm/
Dbtm_ble_addr.cc106 static void btm_gen_non_resolve_paddr_cmpl(BT_OCTET8 rand) { in btm_gen_non_resolve_paddr_cmpl() argument
116 pp = rand; in btm_gen_non_resolve_paddr_cmpl()
175 uint8_t rand[3]; in rpa_matches_irk() local
176 rand[0] = rpa.address[2]; in rpa_matches_irk()
177 rand[1] = rpa.address[1]; in rpa_matches_irk()
178 rand[2] = rpa.address[0]; in rpa_matches_irk()
181 Octet16 x = crypto_toolbox::aes_128(irk, &rand[0], 3); in rpa_matches_irk()
183 rand[0] = rpa.address[5]; in rpa_matches_irk()
184 rand[1] = rpa.address[4]; in rpa_matches_irk()
185 rand[2] = rpa.address[3]; in rpa_matches_irk()
[all …]
Dbtm_ble.cc1279 memcpy(p_rec->ble.keys.rand, p_keys->penc_key.rand, BT_OCTET8_LEN); in btm_sec_save_le_key()
1581 void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8], uint16_t ediv) { in btm_ble_ltk_request()
1589 memcpy(p_cb->enc_rand, rand, BT_OCTET8_LEN); in btm_ble_ltk_request()
1624 btsnd_hcic_ble_start_enc(p_rec->ble_hci_handle, p_rec->ble.keys.rand, in btm_ble_start_encrypt()
2315 btsnd_hcic_ble_rand(base::Bind([](BT_OCTET8 rand) { in btm_ble_reset_id() argument
2317 memcpy(tmp.rand1.data(), rand, BT_OCTET8_LEN); in btm_ble_reset_id()
2319 [](reset_id_data tmp, BT_OCTET8 rand) { in btm_ble_reset_id() argument
2320 memcpy(tmp.rand1.data() + 8, rand, BT_OCTET8_LEN); in btm_ble_reset_id()
2322 [](reset_id_data tmp, BT_OCTET8 rand) { in btm_ble_reset_id() argument
2323 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.cc82 uint32_t randomness = rand(); in random_length()
105 uint32_t randomness = rand(); in random_adv_type()
118 uint32_t randomness = rand(); in random_data_length()
136 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()
72 array[i] = std::rand(); in TEST()
85 chre::remove_heap(v, std::rand() % s, comp); in TEST()
/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/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/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()
/system/extras/zram-perf/
Dzram-perf.cpp20 uint32_t start = rand(); in fillPageRand()
26 uint32_t val = rand() & 0xfff; in fillPageCompressible()
/system/media/audio_utils/tests/
Dfifo_tests.cpp127 framesToWrite = rand() % (framesToWrite + 1); in main()
162 framesToRead = rand() % (framesToRead + 1); in main()
/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/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/tools/hidl/test/lazy_test/
Dmain.cpp57 times[i] = (size_t)(rand() % (maxWait + 1)); in waitTimes()
/system/security/keystore/
Dgrant_store.cpp56 std::tie(iterator, success) = uid_grant_list.emplace(blobEntry, std::rand()); in put()
/system/hardware/interfaces/suspend/1.0/default/
DSystemSuspendUnitTest.cpp166 std::string wakeupCount = std::to_string(rand()); in unblockSystemSuspendFromWakeupCount()
202 std::string wakeupCount = std::to_string(rand()); in checkLoop()
/system/bt/stack/test/
Dstack_smp_test.cc90 extern tSMP_STATUS smp_calculate_comfirm(tSMP_CB* p_cb, const Octet16& rand,
/system/core/storaged/tests/
Dstoraged_test.cpp262 std::uniform_real_distribution<> rand(0.8, 1.2); in TEST() local
265 struct disk_perf perf = disk_perf_multiply(norm_perf, rand(gen)); in TEST()
/system/libhwbinder/vts/performance/
DBenchmark_throughput.cpp232 int target = rand() % service_count; in worker_fx()
/system/keymaster/tests/
Dkey_blob_test.cpp301 buf[i] = static_cast<uint8_t>(rand()); in TEST_F()
/system/bt/stack/hcic/
Dhciblecmds.cc393 uint8_t rand[HCIC_BLE_RAND_DI_SIZE], in btsnd_hcic_ble_start_enc()
405 ARRAY_TO_STREAM(pp, rand, HCIC_BLE_RAND_DI_SIZE); in btsnd_hcic_ble_start_enc()

12