/base/security/device_security_level/services/common/ |
D | dslm_crypto.c | 23 void GenerateRandom(RandomValue *rand, uint32_t length) in GenerateRandom() argument 25 if (rand == NULL) { in GenerateRandom() 28 rand->length = (length > RANDOM_MAX_LEN) ? RANDOM_MAX_LEN : length; in GenerateRandom() 30 RAND_bytes(&rand->value[0], rand->length); in GenerateRandom() 32 rand->value[0] = 1; in GenerateRandom()
|
/base/security/dlp_permission_service/frameworks/common/src/ |
D | random_mbedtls.cpp | 27 unsigned int rand; in GetRandomUint32() local 28 …Mbedtls::GetInstance().GenerateRandomArray(reinterpret_cast<unsigned char *>(&rand), sizeof(rand)); in GetRandomUint32() 32 return rand; in GetRandomUint32()
|
/base/security/access_token/frameworks/common/src/ |
D | random_mbedtls.cpp | 27 unsigned int rand; in GetRandomUint32() local 28 …Mbedtls::GetInstance().GenerateRandomArray(reinterpret_cast<unsigned char *>(&rand), sizeof(rand)); in GetRandomUint32() 32 return rand; in GetRandomUint32()
|
/base/security/crypto_framework/frameworks/js/napi/crypto/src/ |
D | napi_rand.cpp | 44 HcfRand *rand = nullptr; member 76 context->rand = nullptr; in FreeCryptoFwkCtx() 111 HcfRand *randObj = context->rand; in GenerateRandomExecute() 172 context->rand = napiRand->GetRand(); in BuildGenerateRandomCtx() 266 HcfRand *rand = napiRand->GetRand(); in JsGenerateRandomSync() local 267 if (rand == nullptr) { in JsGenerateRandomSync() 274 HcfResult res = rand->generateRandom(rand, numBytes, &randBlob); in JsGenerateRandomSync() 308 HcfRand *rand = napiRand->GetRand(); in JsSetSeed() local 309 if (rand == nullptr) { in JsSetSeed() 314 HcfResult res = rand->setSeed(rand, seedBlob); in JsSetSeed() [all …]
|
/base/security/device_security_level/services/dslm/ |
D | dslm_inner_process.c | 47 RandomValue rand = {0}; in CheckAndGenerateChallenge() local 48 GenerateRandom(&rand, RANDOM_MAX_LEN); in CheckAndGenerateChallenge() 49 device->nonce = *(uint64_t *)&rand.value[0]; in CheckAndGenerateChallenge()
|
/base/security/device_auth/frameworks/deviceauth_lite/source/key_agreement/ |
D | pake_server.c | 240 struct random_value rand = generate_random(esk_len); in generate_pake_params() local 241 if (rand.length == 0) { in generate_pake_params() 245 pake_server->self_esk = *(struct esk *)&rand; in generate_pake_params() 278 struct random_value rand = generate_random(CHALLENGE_BUFF_LENGTH); in get_challenge() local 279 if (rand.length == CHALLENGE_BUFF_LENGTH) { in get_challenge() 281 challenge.length = rand.length; in get_challenge() 282 …(void)memcpy_s(challenge.challenge, sizeof(challenge.challenge), rand.random_value, CHALLENGE_BUFF… in get_challenge() 292 struct random_value rand = generate_random(HC_SALT_BUFF_LEN); in get_salt() local 293 if (rand.length == HC_SALT_BUFF_LEN) { in get_salt() 295 salt.length = rand.length; in get_salt() [all …]
|
D | pake_client.c | 216 struct random_value rand = generate_random(esk_len); in parse_start_response_data() local 217 if (rand.length == 0) { in parse_start_response_data() 223 pake_client->self_esk = *(struct esk *)&rand; in parse_start_response_data() 260 struct random_value rand = generate_random(CHALLENGE_BUFF_LENGTH); in build_end_request_data() local 261 if (rand.length == CHALLENGE_BUFF_LENGTH) { in build_end_request_data() 263 challenge.length = rand.length; in build_end_request_data() 264 if (memcpy_s(challenge.challenge, sizeof(challenge.challenge), rand.random_value, in build_end_request_data()
|
/base/security/access_token/services/accesstokenmanager/main/cpp/src/token/ |
D | accesstoken_id_manager.cpp | 82 unsigned int rand = GetRandomUint32(); in CreateTokenId() local 83 if (rand == 0) { in CreateTokenId() 94 innerId.tokenUniqueID = rand & TOKEN_RANDOM_MASK; in CreateTokenId()
|
/base/security/device_security_level/services/include/ |
D | dslm_crypto.h | 36 void GenerateRandom(RandomValue *rand, uint32_t length);
|
/base/security/crypto_framework/test/fuzztest/rand/hcfrandcreate_fuzzer/ |
D | BUILD.gn | 19 module_output_path = "crypto_framework/rand" 25 "//base/security/crypto_framework/test/fuzztest/rand/hcfrandcreate_fuzzer"
|
/base/security/crypto_framework/frameworks/ |
D | frameworks.gni | 32 "${plugin_path}/openssl_plugin/crypto_operation/rand/inc", 50 framework_rand_files = [ "${framework_path}/crypto_operation/rand.c" ]
|
/base/notification/eventhandler/frameworks/test/moduletest/ |
D | event_handler_test_common.h | 36 return static_cast<uint32_t>(std::rand()); in Random()
|
D | event_handler_press_module_test.cpp | 35 return static_cast<uint32_t>(std::rand() % remainderNum); in RandomInTen()
|
/base/security/crypto_framework/ |
D | README_zh.md | 32 │ └── rand # 随机数
|
D | BUILD.gn | 44 "test/fuzztest/rand/hcfrandcreate_fuzzer:fuzztest",
|
/base/update/updateservice/services/firmware/common/src/ |
D | firmware_update_adapter.cpp | 62 int32_t randomInt = rand() % RANDOM_BOUND_SIX; /* random len is 6 */ in GetRequestId()
|
/base/update/updateservice/services/core/ability/utils/include/ |
D | time_utils.h | 55 return minTime + rand() % (maxTime - minTime); in GetRandTime()
|
D | encrypt_utils.h | 40 return min + rand() % (max - min); in GetRand()
|
/base/security/crypto_framework/plugin/ |
D | plugin.gni | 28 "${plugin_path}/openssl_plugin/crypto_operation/rand/inc", 72 [ "${plugin_path}/openssl_plugin/crypto_operation/rand/src/rand_openssl.c" ]
|
/base/security/device_auth/deps_adapter/key_management_adapter/impl/src/mini/ |
D | huks_adapter.c | 145 static int32_t GenerateRandom(Uint8Buff *rand) in GenerateRandom() argument 147 CHECK_PTR_RETURN_HAL_ERROR_CODE(rand, "rand"); in GenerateRandom() 148 CHECK_PTR_RETURN_HAL_ERROR_CODE(rand->val, "rand->val"); in GenerateRandom() 149 CHECK_LEN_ZERO_RETURN_ERROR_CODE(rand->length, "rand->length"); in GenerateRandom() 151 struct HksBlob randBlob = { rand->length, rand->val }; in GenerateRandom()
|
/base/security/access_token/interfaces/innerkits/nativetoken/src/ |
D | nativetoken.c | 282 uint32_t rand; in CreateNativeTokenId() local 288 if (GetRandomTokenId(&rand) != ATRET_SUCCESS) { in CreateNativeTokenId() 291 if (IsTokenUniqueIdExist(rand & (TOKEN_RANDOM_MASK)) == 0) { in CreateNativeTokenId() 302 innerId->tokenUniqueId = rand & (TOKEN_RANDOM_MASK); in CreateNativeTokenId()
|
/base/security/device_auth/deps_adapter/key_management_adapter/interfaces/ |
D | alg_defs.h | 78 typedef int32_t (*GenerateRandomFunc)(Uint8Buff *rand);
|
/base/security/device_auth/deps_adapter/key_management_adapter/impl/src/small/ |
D | huks_adapter.c | 125 static int32_t GenerateRandom(Uint8Buff *rand) in GenerateRandom() argument 127 CHECK_PTR_RETURN_HAL_ERROR_CODE(rand, "rand"); in GenerateRandom() 128 CHECK_PTR_RETURN_HAL_ERROR_CODE(rand->val, "rand->val"); in GenerateRandom() 129 CHECK_LEN_ZERO_RETURN_ERROR_CODE(rand->length, "rand->length"); in GenerateRandom() 131 struct HksBlob randBlob = { rand->length, rand->val }; in GenerateRandom()
|
/base/security/device_auth/deps_adapter/key_management_adapter/impl/src/standard/ |
D | huks_adapter.c | 127 static int32_t GenerateRandom(Uint8Buff *rand) in GenerateRandom() argument 129 CHECK_PTR_RETURN_HAL_ERROR_CODE(rand, "rand"); in GenerateRandom() 130 CHECK_PTR_RETURN_HAL_ERROR_CODE(rand->val, "rand->val"); in GenerateRandom() 131 CHECK_LEN_ZERO_RETURN_ERROR_CODE(rand->length, "rand->length"); in GenerateRandom() 133 struct HksBlob randBlob = { rand->length, rand->val }; in GenerateRandom()
|
/base/hiviewdfx/hiview/plugins/eventlogger/test/unittest/common/ |
D | event_logger_action_test.cpp | 254 temp2[i] = rand();
|