Searched refs:random (Results 1 - 25 of 32) sorted by relevance

12

/system/update_engine/update_manager/
H A Dprng.h20 #include <random>
26 // A thread-safe, unsecure, 32-bit pseudo-random number generator based on
33 // Returns a random unsigned 32-bit integer.
36 // Returns a random integer uniformly distributed in the range [min, max].
43 // A pseudo-random number generator.
/system/connectivity/shill/
H A Dip_address_store.h20 #include <random>
H A Ddefault_profile.h20 #include <random>
H A Ddefault_profile.cc19 #include <random>
/system/extras/puncture_fs/
H A Dpuncture_fs.c65 return start + (((u64)random() << 31) | (u64)random()) % (end - start);
66 return start + (random() % (end - start));
70 return 'A' + random() % ('Z' - 'A');
81 base[random() % min(base_length, size)] = get_random_char();
/system/bt/vendor_libs/test_vendor_lib/scripts/
H A Dtest_channel.py41 import random namespace
52 return ''.join(random.SystemRandom().choice(string.ascii_uppercase + \
56 return ''.join(random.SystemRandom().choice(string.digits) for _ in \
135 explicit name or address is not provided, a random string of characters
189 random name is used instead.
/system/extras/verity/fec/tests/
H A Dfec.py17 import random namespace
40 offset = random.randrange(0, size - max_errors)
/system/connectivity/dhcp_client/
H A Ddhcpv4.h20 #include <random>
H A Ddhcpv4.cc27 #include <random>
/system/core/adb/
H A Dtest_adb.py26 import random namespace
212 random.seed(0)
H A Dtest_device.py24 import random namespace
615 size = random.randrange(min_size, max_size, 1024)
632 size = random.randrange(min_size, max_size, 1024)
687 # Create 32 random files.
739 # Create some random files and a subdirectory containing more files.
831 # Populate device directory with random files.
866 # Populate device directory with random files.
899 # Populate device directory with random files.
923 # Populate device directory with random files.
951 # Populate device directory with random file
[all...]
/system/extras/tests/net_test/
H A Dforwarding_test.py18 import random namespace
100 netid, iface1, iface2 = random.sample(netids, 3)
H A Dneighbour_test.py18 import random namespace
85 self.netid = random.choice(self.tuns.keys())
197 routing_mode = random.choice(["mark", "oif", "uid"])
279 routing_mode = random.choice(["mark", "oif", "uid"])
H A Dsock_diag_test.py20 import random namespace
45 family, addr = random.choice([
137 random.shuffle(socketpairs)
305 s = random.choice(socketpair)
306 if random.randrange(0, 2) == 1:
361 netid = random.choice(self.tuns.keys())
382 self.netid = random.choice(self.tuns.keys())
H A Dmultinetwork_base.py23 import random namespace
150 return random.randint(*cls.UidRangeForNetid(netid))
205 return prefix + "%d.%d" % (random.randint(0, 31), random.randint(0, 255))
207 return prefix + "%x:%x" % (random.randint(0, 65535),
208 random.randint(0, 65535))
H A Dnet_test.py19 import random namespace
75 id=random.randint(0, 65535),
H A Dpackets.py17 import random namespace
43 return random.randint(1025, 65535)
H A Dsrcaddr_selection_test.py18 import random namespace
144 self.test_netid = random.choice(self.tuns.keys())
H A Dmultinetwork_test.py19 import random namespace
610 # Send a UDP packet to a random on-link destination.
837 return random.randint(1000000, 2000000)
/system/core/crash_reporter/
H A Dcrash_sender205 # Generate a uniform random number in 0..max-1.
208 # 32-bit random number read from /dev/urandom may be interpreted as negative
212 # roughly uniform random distribution for the modulo (as we are merely ignoring
219 local random="$(od -An -N4 -tu /dev/urandom)"
220 echo $(((random < 0 ? -random : random) % max))
/system/core/gatekeeperd/
H A DSoftGateKeeper.h89 virtual void GetRandom(void *random, uint32_t requested_length) const { argument
90 if (random == NULL) return;
91 RAND_pseudo_bytes((uint8_t *) random, requested_length);
/system/gatekeeper/include/gatekeeper/
H A Dgatekeeper.h97 * Assings the random to the random UniquePtr, relinquishing ownership to the caller
99 virtual void GetRandom(void *random, uint32_t requested_size) const = 0;
/system/extras/perfprofd/tests/
H A Dperfprofd_test.cc612 I: random seed set to 12345678
668 I: random seed set to 12345678
/system/bt/stack/smp/
H A Dsmp_utils.c66 SMP_RAND_CMD_SIZE, /* 0x04: pairing random */
94 smp_command_has_valid_fixed_length, /* 0x04: pairing random */
120 smp_parameter_unconditionally_valid, /* 0x04: pairing random */
158 smp_build_rand_cmd, /* 0x04: pairing random */
1313 ** Description This function returns random input value to be used in commitment
1315 ** (if bit["round"] in "random" array == 1 then returns 0x81
1321 UINT8 smp_calculate_random_input(UINT8 *random, UINT8 round) argument
1327 SMP_TRACE_DEBUG("random: 0x%02x, round: %d, i: %d, j: %d", random[i], round, i, j);
1328 ri = ((random[
[all...]
/system/core/libutils/tests/
H A DLruCache_test.cpp217 int index = random() % kNumKeys;

Completed in 455 milliseconds

12