/system/bt/osi/src/ |
D | osi.cc | 36 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/ |
D | smp_keys.cc | 89 void smp_proc_passkey(tSMP_CB* p_cb, BT_OCTET8 rand) { in smp_proc_passkey() argument 92 uint8_t* pp = rand; in smp_proc_passkey() 201 [](tSMP_CB* p_cb, BT_OCTET8 rand) { in smp_generate_csrk() argument 203 STREAM_TO_UINT16(div, rand); in smp_generate_csrk() 318 tSMP_STATUS smp_calculate_comfirm(tSMP_CB* p_cb, const Octet16& rand, in smp_calculate_comfirm() argument 334 smp_xor_128(&p1, rand); in smp_calculate_comfirm() 363 smp_debug_print_nbyte_little_endian(p_cb->rand.data(), "local_rand", 16); in smp_generate_confirm() 365 tSMP_STATUS status = smp_calculate_comfirm(p_cb, p_cb->rand, &output); in smp_generate_confirm() 399 [](tSMP_CB* p_cb, BT_OCTET8 rand) { in smp_generate_srand_mrand_confirm() argument 400 memcpy(p_cb->rand.data(), rand, 8); in smp_generate_srand_mrand_confirm() [all …]
|
/system/bt/stack/btm/ |
D | btm_ble_addr.cc | 118 return interval_min_ms + std::rand() % interval_random_part_max_ms; in btm_get_next_private_addrress_interval_ms() 149 uint8_t rand[3]; in rpa_matches_irk() local 150 rand[0] = rpa.address[2]; in rpa_matches_irk() 151 rand[1] = rpa.address[1]; in rpa_matches_irk() 152 rand[2] = rpa.address[0]; in rpa_matches_irk() 155 Octet16 x = crypto_toolbox::aes_128(irk, &rand[0], 3); in rpa_matches_irk() 157 rand[0] = rpa.address[5]; in rpa_matches_irk() 158 rand[1] = rpa.address[4]; in rpa_matches_irk() 159 rand[2] = rpa.address[3]; in rpa_matches_irk() 161 if (memcmp(x.data(), &rand[0], 3) == 0) { in rpa_matches_irk()
|
D | btm_ble.cc | 1128 memcpy(p_rec->ble.keys.rand, p_keys->penc_key.rand, BT_OCTET8_LEN); in btm_sec_save_le_key() 1432 void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8], uint16_t ediv) { in btm_ble_ltk_request() 1440 memcpy(p_cb->enc_rand, rand, BT_OCTET8_LEN); in btm_ble_ltk_request() 1475 btsnd_hcic_ble_start_enc(p_rec->ble_hci_handle, p_rec->ble.keys.rand, in btm_ble_start_encrypt() 2041 btsnd_hcic_ble_rand(base::Bind([](BT_OCTET8 rand) { in btm_ble_reset_id() argument 2043 memcpy(tmp.rand1.data(), rand, BT_OCTET8_LEN); in btm_ble_reset_id() 2045 [](reset_id_data tmp, BT_OCTET8 rand) { in btm_ble_reset_id() argument 2046 memcpy(tmp.rand1.data() + 8, rand, BT_OCTET8_LEN); in btm_ble_reset_id() 2048 [](reset_id_data tmp, BT_OCTET8 rand) { in btm_ble_reset_id() argument 2049 memcpy(tmp.rand2.data(), rand, BT_OCTET8_LEN); in btm_ble_reset_id() [all …]
|
/system/security/keystore/tests/ |
D | confirmationui_rate_limiting_test.cpp | 84 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/ |
D | broken_adv.cc | 64 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/ |
D | mmapPerf.cpp | 38 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/extras/multinetwork/ |
D | dnschk.cpp | 53 name = fmt::format("{}-{}-ds.metric.gstatic.com", rand(), rand()); in main()
|
D | httpurl.cpp | 50 parameters->host = StringPrintf("%d-%d-ipv6test.ds.metric.gstatic.com", rand(), rand()); in parseUrl()
|
/system/chre/util/tests/ |
D | heap_test.cc | 32 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/core/fs_mgr/libsnapshot/ |
D | test_helpers.cpp | 92 unique_fd rand(open("/dev/urandom", O_RDONLY)); in WriteRandomData() local 103 ssize_t n = TEMP_FAILURE_RETRY(read(rand.get(), buf, sizeof(buf))); in WriteRandomData() 132 unique_fd rand(open("/dev/urandom", O_RDONLY)); in WriteRandomData() local 133 if (rand < 0) { in WriteRandomData() 152 if (!ReadFully(rand, block.data(), block.size())) { in WriteRandomData()
|
/system/extras/ioshark/ |
D | ioshark_bench_mmap.c | 94 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/ |
D | ClatdControllerTest.cpp | 137 uint32_t rand = arc4random_uniform(0xffffffff); in TEST_F() local 138 uint16_t rand1 = rand & 0xffff; in TEST_F() 139 uint16_t rand2 = (rand >> 16) & 0xffff; in TEST_F()
|
/system/logging/logd/ |
D | LogBufferTest.cpp | 230 auto rand_uint32 = [](int max) -> uint32_t { return rand() % max; }; in GenerateRandomLogMessage() 233 .pid = rand() % 5000, in GenerateRandomLogMessage() 251 char priority = ANDROID_LOG_INFO + rand() % 2; in GenerateRandomLogMessage() 254 int tag_length = 2 + rand() % 10; in GenerateRandomLogMessage() 256 message.push_back('a' + rand() % 26); in GenerateRandomLogMessage() 260 int msg_length = 2 + rand() % 1000; in GenerateRandomLogMessage() 262 message.push_back('a' + rand() % 26); in GenerateRandomLogMessage()
|
D | SerializedFlushToStateTest.cpp | 195 unsigned int num_messages = 1 + rand() % 15; in TEST_F() 198 bool compress = rand() % 2; in TEST_F() 199 int buf = rand() % LOG_ID_MAX; in TEST_F()
|
/system/extras/verity/ |
D | build_verity_tree_test.cpp | 138 std::min<size_t>(rand() % 10 * 4096, data.size() - offset); in TEST_F() 160 size_t data_length = std::min<size_t>(rand() % 40960, data.size() - offset); in TEST_F() 182 size_t data_length = std::min<size_t>(rand() % 40960, data.size() - offset); in TEST_F()
|
/system/extras/profcollectd/libprofcollectd/ |
D | config.rs | 22 use rand::Rng; 137 let mut node_id = rand::thread_rng().gen::<[u8; 6]>(); in generate_random_node_id()
|
/system/security/keystore2/test_utils/ |
D | lib.rs | 38 let number: u16 = rand::random(); in new()
|
/system/bt/stack/include/ |
D | ble_hci_link_interface.h | 32 extern void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8],
|
/system/extras/zram-perf/ |
D | zram-perf.cpp | 20 uint32_t start = rand(); in fillPageRand() 26 uint32_t val = rand() & 0xfff; in fillPageCompressible()
|
/system/bt/gd/security/ |
D | pairing_handler_le.cc | 385 std::optional<std::array<uint8_t, 8>> rand; /* Legacy only */ in ReceiveKeys() local 407 rand = std::get<CentralIdentificationView>(packet).GetRand(); in ReceiveKeys() 448 .remote_rand = rand, in ReceiveKeys() 455 std::array<uint8_t, 8> rand, Octet16 irk, Address identity_address, in SendKeys() argument 461 SendL2capPacket(i, CentralIdentificationBuilder::Create(ediv, rand)); in SendKeys()
|
D | ecdh_keys.cc | 45 for (size_t i = 0; i < SIZE; i++) r[i] = std::rand(); in GenerateRandom()
|
/system/extras/tests/ext4/ |
D | rand_emmc_perf.c | 126 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/ |
D | fifo_tests.cpp | 127 framesToWrite = rand() % (framesToWrite + 1); in main() 162 framesToRead = rand() % (framesToRead + 1); in main()
|
/system/core/trusty/libtrusty/tipc-test/ |
D | tipc_test.c | 371 msg_len = rand() % msgsz; in echo_test() 435 msg_len = rand() % msgsz; in burst_write_test() 755 msg_len = rand() % msgsz; in writev_test() 837 msg_len = rand() % msgsz; in readv_test()
|