Home
last modified time | relevance | path

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

123456

/foundation/communication/bluetooth/frameworks/inner/src/
H A Duuid.cpp74 UUID random; in RandomUUID() local
84 random.uuid_[15] = static_cast<uint8_t>(tv.tv_usec & 0x00000000000000FF); // 15是uuid的数组下标 in RandomUUID()
85 random.uuid_[14] = static_cast<uint8_t>((tv.tv_usec & 0x000000000000FF00) >> 8); // 14是uuid的数组下标,右移8位 in RandomUUID()
86 random.uuid_[13] = static_cast<uint8_t>((tv.tv_usec & 0x0000000000FF0000) >> 16); // 13是uuid的数组下标,右移16位 in RandomUUID()
87 random.uuid_[12] = static_cast<uint8_t>((tv.tv_usec & 0x00000000FF000000) >> 24); // 12是uuid的数组下标,右移24位 in RandomUUID()
88 random.uuid_[10] = static_cast<uint8_t>((tv.tv_usec & 0x000000FF00000000) >> 32); // 10是uuid的数组下标,右移32位 in RandomUUID()
89 random.uuid_[9] = static_cast<uint8_t>((tv.tv_usec & 0x0000FF0000000000) >> 40); // 9是uuid的数组下标,右移40位 in RandomUUID()
90 random.uuid_[8] = static_cast<uint8_t>((tv.tv_usec & 0x00FF000000000000) >> 48); // 8是uuid的数组下标,右移48位 in RandomUUID()
91 random.uuid_[7] = static_cast<uint8_t>((tv.tv_usec & 0xFF00000000000000) >> 56); // 7是uuid的数组下标,右移56位 in RandomUUID()
93 random in RandomUUID()
[all...]
/foundation/communication/bluetooth/frameworks/inner/ipc/common/
H A Dbt_uuid.cpp32 Uuid random; in Random() local
46 random.uuid_[UUID_NODE_SIXTH_BYTE] = in Random()
48 random.uuid_[UUID_NODE_FIFTH_BYTE] = in Random()
50 random.uuid_[UUID_NODE_FOURTH_BYTE] = in Random()
52 random.uuid_[UUID_NODE_THIRD_BYTE] = in Random()
54 random.uuid_[UUID_NODE_FIRST_BYTE] = in Random()
56 random.uuid_[UUID_CLOCK_SEQ] = in Random()
58 random.uuid_[UUID_VARIANT] = in Random()
60 random.uuid_[UUID_TIME_HIGH] = in Random()
62 random in Random()
[all...]
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_toolkit/utils/
H A Dwifi_randommac_helper.cpp123 long random = 0; in GetRandom() local
125 int fd = open("/dev/random", O_RDONLY); in GetRandom()
128 length = read(fd, &random, sizeof(random)); in GetRandom()
133 if (random == 0) { in GetRandom()
134 fd = open("/dev/random", O_RDONLY); in GetRandom()
136 length = read(fd, &random, sizeof(random)); in GetRandom()
143 return (random >= 0 ? random in GetRandom()
244 GenerateRandomMacAddressByLong(unsigned long long random, std::string &randomMacAddr) GenerateRandomMacAddressByLong() argument
[all...]
H A Dwifi_randommac_helper.h18 #include <random>
31 * @Description Generate random number
40 * @param randomMacAddr - random MAC address[out]
48 * @param randomMacAddr - random MAC address[out]
55 * @param random - unsigned long long value mac address[in]
56 * @param randomMacAddr - random MAC address[out]
59 static int GenerateRandomMacAddressByLong(unsigned long long random, std::string &randomMacAddr);
66 * @param randomMacAddr - random MAC address[out]
76 * @param randomMacAddr - random MAC address[out]
100 * @param randomMacAddr - random MA
[all...]
/foundation/multimodalinput/input/test/fuzztest/enableinputdevice_fuzzer/
H A Denableinputdevice_fuzzer.cpp41 int32_t random; in EnableInputDeviceFuzzTest() local
42 GetObject<int32_t>(random, data + startPos, size - startPos); in EnableInputDeviceFuzzTest()
43 bool enable = (random % 2) ? false : true; in EnableInputDeviceFuzzTest()
/foundation/multimodalinput/input/test/fuzztest/ispointervisible_fuzzer/
H A Dispointervisible_fuzzer.cpp41 int32_t random; in IsPointerVisibleFuzzTest() local
42 GetObject<int32_t>(random, data + startPos, size - startPos); in IsPointerVisibleFuzzTest()
43 bool visible = (random % 2) ? false : true; in IsPointerVisibleFuzzTest()
/foundation/multimodalinput/input/test/fuzztest/setmoveeventfilters_fuzzer/
H A Dsetmoveeventfilters_fuzzer.cpp45 int32_t random; in SetMoveEventFiltersFuzzTest() local
46 GetObject<int32_t>(random, data + startPos, size - startPos); in SetMoveEventFiltersFuzzTest()
47 bool flag = (random % 2 == 0) ? false : true; in SetMoveEventFiltersFuzzTest()
/foundation/multimodalinput/input/test/fuzztest/setpointervisible_fuzzer/
H A Dsetpointervisible_fuzzer.cpp41 int32_t random; in SetPointerVisibleFuzzTest() local
42 GetObject<int32_t>(random, data + startPos, size - startPos); in SetPointerVisibleFuzzTest()
43 bool visible = (random % 2) ? false : true; in SetPointerVisibleFuzzTest()
/foundation/multimodalinput/input/test/fuzztest/functionkeystate_fuzzer/
H A Dfunctionkeystate_fuzzer.cpp43 int32_t random; in FunctionkeyStateFuzzTest() local
44 GetObject<int32_t>(random, data + startPos, size - startPos); in FunctionkeyStateFuzzTest()
45 bool enable = (random % 2) ? false : true; in FunctionkeyStateFuzzTest()
/foundation/multimodalinput/input/test/fuzztest/pointervisible_fuzzer/
H A Dpointervisible_fuzzer.cpp44 int32_t random = 0; in PointerVisibleFuzzTest() local
46 startPos += GetObject<int32_t>(data + startPos, size - startPos, random); in PointerVisibleFuzzTest()
47 bool visible = (random % 2) ? false : true; in PointerVisibleFuzzTest()
/foundation/communication/dsoftbus/adapter/common/openssl/
H A Dsoftbus_aes_encrypt.c217 uint8_t random[RANDOM_LENGTH] = { 0 }; in SoftBusAesCfbEncrypt() local
225 if (memcpy_s(random, sizeof(random), cipherKey->iv, sizeof(random)) != EOK) { in SoftBusAesCfbEncrypt()
226 COMM_LOGE(COMM_ADAPTER, "random memcpy_s failed!"); in SoftBusAesCfbEncrypt()
230 if (SoftBusGenerateHmacHash(&key, random, sizeof(random), result, SHA256_MAC_LEN) != SOFTBUS_OK) { in SoftBusAesCfbEncrypt()
232 (void)memset_s(random, sizeof(random), 0, sizeof(random)); in SoftBusAesCfbEncrypt()
[all...]
/foundation/multimodalinput/input/test/fuzztest/appendextradata_fuzzer/
H A Dappendextradata_fuzzer.cpp42 int32_t random; in AppendExtraDataFuzzTest() local
43 GetObject<int32_t>(random, data + startPos, size - startPos); in AppendExtraDataFuzzTest()
44 bool appended = (random % 2) ? false : true; in AppendExtraDataFuzzTest()
/foundation/communication/bluetooth_service/services/bluetooth/stack/src/smp/
H A Dsmp_oob.c22 #include "platform/include/random.h"
50 (void)memcpy_s(g_smpScOobMng.random, SMP_RANDOM_DATA_LEN, &number, sizeof(number)); in SMP_GenerateScOobDataStep1()
53 (void)memcpy_s(g_smpScOobMng.random + offset, SMP_RANDOM_DATA_LEN, &number, sizeof(number)); in SMP_GenerateScOobDataStep1()
56 (void)memcpy_s(g_smpScOobMng.random + offset, SMP_RANDOM_DATA_LEN, &number, sizeof(number)); in SMP_GenerateScOobDataStep1()
59 (void)memcpy_s(g_smpScOobMng.random + offset, SMP_RANDOM_DATA_LEN, &number, sizeof(number)); in SMP_GenerateScOobDataStep1()
62 (void)memcpy_s(encryptParam.key, sizeof(encryptParam.key), g_smpScOobMng.random, SMP_RANDOM_DATA_LEN); in SMP_GenerateScOobDataStep1()
162 SMP_MemoryReverseCopy(randomTmp, g_smpScOobMng.random, SMP_RANDOM_DATA_LEN); in SMP_GenerateScOobDataStep4()
H A Dsmp_legacy.c54 (void)memcpy_s(SMP_GetPairMng()->local.random, SMP_RANDOM_DATA_LEN, returnParam->randomNumber, SMP_RAND_NUM_LEN); in SMP_LegacyPairMasterStep2()
72 (void)memcpy_s(SMP_GetPairMng()->local.random + SMP_RAND_NUM_LEN, in SMP_LegacyPairMasterStep3()
77 SMP_ROLE_MASTER, SMP_GetPairMng()->local.random, SMP_RANDOM_DATA_LEN, &cryptC1Step1Param); in SMP_LegacyPairMasterStep3()
144 SMP_MemoryReverseCopy(randomTemp, SMP_GetPairMng()->local.random, SMP_RANDOM_DATA_LEN); in SMP_LegacyPairMasterStep6()
150 LOG_ERROR("Send Pairing random error"); in SMP_LegacyPairMasterStep6()
165 SMP_MemoryReverseCopy(SMP_GetPairMng()->peer.random, (uint8_t *)param->data, SMP_RANDOM_DATA_LEN); in SMP_LegacyPairMasterStep7()
166 SMP_ConstituteC1Step1Param(SMP_ROLE_MASTER, SMP_GetPairMng()->peer.random, SMP_RANDOM_DATA_LEN, &cryptC1Step1Param); in SMP_LegacyPairMasterStep7()
218 cryptS1Param.r1, sizeof(cryptS1Param.r1), SMP_GetPairMng()->peer.random, sizeof(cryptS1Param.r1)); in SMP_LegacyPairMasterStep9()
220 cryptS1Param.r2, sizeof(cryptS1Param.r2), SMP_GetPairMng()->local.random, sizeof(cryptS1Param.r2)); in SMP_LegacyPairMasterStep9()
448 (void)memcpy_s(SMP_GetPairMng()->local.random, SMP_RANDOM_DATA_LE in SMP_LegacyPairSlaveStep4()
[all...]
H A Dsmp_common.h41 void SMP_NotifyCbLtkReq(uint16_t handle, const uint8_t *random, uint16_t ediv);
46 void SMP_NotifyCbGenScOobData(uint8_t status, const uint8_t *random, const uint8_t *confirm);
H A Dsmp.h176 void (*SMP_CallbackLongTermKeyRequest)(uint16_t handle, const uint8_t *random, uint16_t ediv);
181 void (*SMP_CallbackGenerateScOobDataResult)(uint8_t status, const uint8_t *random, const uint8_t *confirm);
259 * @param random Saved peer random.
264 int SMP_StartEncryption(uint16_t handle, const uint8_t *random, uint16_t ediv, const uint8_t *key);
H A Dsmp_def.h140 uint8_t random[SMP_RANDOM_DATA_LEN]; member
209 uint8_t random[SMP_RANDOM_DATA_LEN]; member
253 uint8_t random[SMP_MASTER_RAND_LEN]; member
H A Dsmp_sc_accepter.c114 (void)memcpy_s(SMP_GetPairMng()->local.random, SMP_RANDOM_DATA_LEN, returnParam->randomNumber, SMP_RAND_NUM_LEN); in SMP_ScPairJustworkOrNumericSlaveStep4()
133 (void)memcpy_s(SMP_GetPairMng()->local.random + SMP_RAND_NUM_LEN, in SMP_ScPairJustworkOrNumericSlaveStep5()
138 SMP_MemoryReverseCopy(encryptParam.key, SMP_GetPairMng()->local.random, SMP_RANDOM_DATA_LEN); in SMP_ScPairJustworkOrNumericSlaveStep5()
236 SMP_MemoryReverseCopy(SMP_GetPairMng()->peer.random, (uint8_t *)param->data, SMP_RANDOM_DATA_LEN); in SMP_ScPairJustworkOrNumericSlaveStep9()
239 SMP_MemoryReverseCopy(randomTemp, SMP_GetPairMng()->local.random, SMP_RANDOM_DATA_LEN); in SMP_ScPairJustworkOrNumericSlaveStep9()
249 LOG_ERROR("Send pairing random error."); in SMP_ScPairJustworkOrNumericSlaveStep9()
253 SMP_MemoryReverseCopy(encryptParam.key, SMP_GetPairMng()->peer.random, sizeof(encryptParam.key)); in SMP_ScPairJustworkOrNumericSlaveStep9()
282 (void)memcpy_s(cryptG2Param.Y, sizeof(cryptG2Param.Y), SMP_GetPairMng()->local.random, sizeof(cryptG2Param.Y)); in SMP_ScPairJustworkOrNumericSlaveStep10()
333 SMP_MemoryReverseCopy(randomTemp, SMP_GetPairMng()->local.random, SMP_RANDOM_DATA_LEN); in SMP_ScPairJustworkOrNumericSlaveStep12()
339 LOG_ERROR("Send pairing random erro in SMP_ScPairJustworkOrNumericSlaveStep12()
[all...]
/foundation/distributedhardware/device_manager/utils/src/
H A Ddm_random.cpp18 #include <random>
30 return (randMin + random() % (randMax - randMin)); in GenRandInt()
/foundation/communication/wifi/wifi/test/wifi_standard/wifi_framework/wifi_manage/unittest/Mock/
H A Dmock_wifi_global_func.h20 #include <random>
/foundation/filemanagement/dfs_service/services/distributedfiledaemon/src/ipc/
H A Ddaemon_execute.cpp22 #include <random>
190 std::string random = std::to_string(rd()); in GetZipName() local
191 std::string zipName = value + "_" + random + ".zip"; in GetZipName()
194 random = std::to_string(rd()); in GetZipName()
195 zipName = value + "_" + random + ".zip"; in GetZipName()
/foundation/filemanagement/file_api/interfaces/kits/cj/src/
H A Dtranslistener.cpp18 #include <random>
51 std::string random = std::to_string(rd()); in CreateDfsCopyPath() local
52 while (std::filesystem::exists(DISTRIBUTED_PATH + random)) { in CreateDfsCopyPath()
53 random = std::to_string(rd()); in CreateDfsCopyPath()
55 return random; in CreateDfsCopyPath()
/foundation/resourceschedule/ffrt/test/ut/testcase/
H A Dut_graphCheck.cpp16 #include <random>
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/udmf/preprocess/
H A Dpreprocess_utils.h19 #include <random>
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fs/properties/copy_listener/
H A Dtrans_listener.cpp20 #include <random>
57 std::string random = std::to_string(rd()); in CreateDfsCopyPath() local
58 while (std::filesystem::exists(DISTRIBUTED_PATH + random)) { in CreateDfsCopyPath()
59 random = std::to_string(rd()); in CreateDfsCopyPath()
61 return random; in CreateDfsCopyPath()

Completed in 12 milliseconds

123456