/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/rand/src/ |
H A D | rand_openssl.c | 34 static HcfResult OpensslGenerateRandom(HcfRandSpi *self, int32_t numBytes, HcfBlob *random) in OpensslGenerateRandom() argument 40 if (numBytes <= 0) { in OpensslGenerateRandom() 41 LOGE("Invalid numBytes!"); in OpensslGenerateRandom() 44 random->data = (uint8_t *)HcfMalloc(numBytes, 0); in OpensslGenerateRandom() 49 int32_t ret = OpensslRandPrivBytes(random->data, numBytes); in OpensslGenerateRandom() 58 random->len = numBytes; in OpensslGenerateRandom()
|
/base/update/sys_installer/services/module_update/util/src/ |
H A D | module_hvb_ops.cpp | 37 static bool ParseReadParam(const std::string &path, const int64_t offset, const uint64_t numBytes, off_t &outOffset, in ParseReadParam() argument 61 if (outCount > numBytes) { in ParseReadParam() 62 outCount = numBytes; in ParseReadParam() 68 struct hvb_ops *ops, const char *partition, int64_t offset, uint64_t numBytes, void *buf, uint64_t *outNumRead) in HvbReadFromPartition() 87 if (!ParseReadParam(path, offset, numBytes, realOffset, count)) { in HvbReadFromPartition() 108 struct hvb_ops *ops, const char *partition, int64_t offset, uint64_t numBytes, const void *buf) in HvbWriteToPartition() 67 HvbReadFromPartition( struct hvb_ops *ops, const char *partition, int64_t offset, uint64_t numBytes, void *buf, uint64_t *outNumRead) HvbReadFromPartition() argument 107 HvbWriteToPartition( struct hvb_ops *ops, const char *partition, int64_t offset, uint64_t numBytes, const void *buf) HvbWriteToPartition() argument
|
/base/security/crypto_framework/frameworks/js/jsi/src/ |
H A D | jsi_rand.cpp | 73 int32_t numBytes = (int32_t)JSI::ValueToNumber(args[0]); in GenerateRandom() local 74 if (numBytes <= 0) { in GenerateRandom() 75 LOGE("GenerateRandom numBytes too small!"); in GenerateRandom() 80 HcfResult res = randObj->generateRandom(randObj, numBytes, &randBlob); in GenerateRandom() 107 int32_t numBytes = (int32_t)JSI::ValueToNumber(args[0]); in GenerateRandomSync() local 108 if (numBytes <= 0) { in GenerateRandomSync() 109 LOGE("GenerateRandomSync numBytes too small!"); in GenerateRandomSync() 113 HcfResult res = randObj->generateRandom(randObj, numBytes, &randBlob); in GenerateRandomSync()
|
/base/security/crypto_framework/plugin/mbedtls_plugin/rand/src/ |
H A D | mbedtls_rand.c | 55 static HcfResult MbedtlsGenerateRandom(HcfRandSpi *self, int32_t numBytes, HcfBlob *random) in MbedtlsGenerateRandom() argument 61 if (numBytes <= 0) { in MbedtlsGenerateRandom() 62 LOGE("Invalid numBytes!"); in MbedtlsGenerateRandom() 70 random->data = (uint8_t *)HcfMalloc(numBytes, 0); in MbedtlsGenerateRandom() 75 int32_t ret = mbedtls_ctr_drbg_random(ctrDrbg, random->data, numBytes); in MbedtlsGenerateRandom() 82 random->len = numBytes; in MbedtlsGenerateRandom() 108 LOGE("Invalid numBytes!"); in MbedtlsSetSeed()
|
/base/startup/init/interfaces/innerkits/fs_manager/libfs_hvb/ |
H A D | hvb_ops.c | 70 int64_t offset, uint64_t numBytes, in HvbReadFromPartition() 119 ssize_t numRead = read(fd, buf, numBytes); in HvbReadFromPartition() 120 if (numRead < 0 || (size_t)numRead != numBytes) { in HvbReadFromPartition() 121 BEGET_LOGE("Failed to read %lld bytes from %s offset %lld", numBytes, in HvbReadFromPartition() 145 int64_t offset, uint64_t numBytes, in HvbWriteToPartition() 68 HvbReadFromPartition(struct hvb_ops* ops, const char* partition, int64_t offset, uint64_t numBytes, void* buf, uint64_t* outNumRead) HvbReadFromPartition() argument 143 HvbWriteToPartition(struct hvb_ops* ops, const char* partition, int64_t offset, uint64_t numBytes, const void* buf) HvbWriteToPartition() argument
|
/base/security/crypto_framework/frameworks/cj/src/ |
H A D | random_impl.cpp | 41 HcfBlob RandomImpl::GenerateRandom(int32_t numBytes, int32_t* errCode) in GenerateRandom() argument 49 HcfResult res = randObj_->generateRandom(randObj_, numBytes, &randBlob); in GenerateRandom()
|
H A D | crypto_ffi.cpp | 60 HcfBlob FfiOHOSGenerateRandom(int64_t id, int32_t numBytes, int32_t* errCode) in FfiOHOSGenerateRandom() argument 70 randBlob = instance->GenerateRandom(numBytes, errCode); in FfiOHOSGenerateRandom()
|
/base/security/crypto_framework/frameworks/crypto_operation/ |
H A D | rand.c | 71 static HcfResult GenerateRandom(HcfRand *self, int32_t numBytes, HcfBlob *random) in GenerateRandom() argument 77 if (numBytes <= 0) { in GenerateRandom() 78 LOGE("Invalid numBytes!"); in GenerateRandom() 86 ((HcfRandImpl *)self)->spiObj, numBytes, random); in GenerateRandom()
|
/base/security/crypto_framework/frameworks/spi/ |
H A D | rand_spi.h | 34 HcfResult (*engineGenerateRandom)(HcfRandSpi *self, int32_t numBytes, HcfBlob *random);
|
/base/security/crypto_framework/interfaces/inner_api/crypto_operation/ |
H A D | rand.h | 32 HcfResult (*generateRandom)(HcfRand *self, int32_t numBytes, HcfBlob *random);
|
/base/security/crypto_framework/frameworks/js/napi/crypto/src/ |
H A D | napi_rand.cpp | 39 int32_t numBytes = 0; member 123 int32_t numBytes = context->numBytes; in GenerateRandomExecute() local 124 context->errCode = randObj->generateRandom(randObj, numBytes, randBlob); in GenerateRandomExecute() 162 if (!GetInt32FromJSParams(env, argv[PARAM0], context->numBytes)) { in BuildGenerateRandomCtx() 163 LOGE("get numBytes failed!"); in BuildGenerateRandomCtx() 263 int32_t numBytes = 0; in JsGenerateRandomSync() local 264 if (!GetInt32FromJSParams(env, argv[PARAM0], numBytes)) { in JsGenerateRandomSync() 265 napi_throw(env, GenerateBusinessError(env, HCF_INVALID_PARAMS, "get numBytes failed!")); in JsGenerateRandomSync() 266 LOGE("get numBytes faile in JsGenerateRandomSync() [all...] |
/base/telephony/core_service/services/sim/src/ |
H A D | ruim_file.cpp | 364 int numBytes = 0; in ProcessGetSpnDone() local 366 for (numBytes = 0; numBytes < spnDataLen; numBytes++) { in ProcessGetSpnDone() 367 if ((spnData[numBytes] & BYTE_NUM) == BYTE_NUM) { in ProcessGetSpnDone() 372 if (numBytes == 0) { in ProcessGetSpnDone() 377 ParseSpnName(encoding, spnData, numBytes); in ProcessGetSpnDone()
|
/base/security/crypto_framework/frameworks/cj/include/ |
H A D | random_impl.h | 32 HcfBlob GenerateRandom(int32_t numBytes, int32_t* errCode);
|
H A D | crypto_ffi.h | 56 FFI_EXPORT HcfBlob FfiOHOSGenerateRandom(int64_t id, int32_t numBytes, int32_t* errCode);
|
/base/hiviewdfx/hiview/base/utility/ |
H A D | hiview_zip_util.cpp | 77 size_t numBytes = fread(buf, 1, sizeof(buf), srcFp); in AddFileInZip() local 78 if (numBytes == 0) { in AddFileInZip() 86 zipWriteInFileInZip(zipFile_, buf, static_cast<unsigned int>(numBytes)); in AddFileInZip()
|
/base/hiviewdfx/hiview/framework/native/unified_collection/collector/utils/ |
H A D | trace_utils.cpp | 414 size_t numBytes = fread(buf, 1, sizeof(buf), srcFp);
in ZipTraceFile() local 415 if (numBytes <= 0) {
in ZipTraceFile() 420 zipWriteInFileInZip(zipFile, buf, static_cast<unsigned int>(numBytes));
in ZipTraceFile()
|