Home
last modified time | relevance | path

Searched refs:opMode (Results 1 – 25 of 55) sorted by relevance

123

/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/cipher/src/
H A Dcipher_sm2_openssl.c44 static HcfResult CheckCipherInitParams(enum HcfCryptoMode opMode, HcfKey *key) in CheckCipherInitParams() argument
46 switch (opMode) { in CheckCipherInitParams()
60 LOGE("Invalid opMode %d", opMode); in CheckCipherInitParams()
67 …ic HcfResult InitSm2Key(HcfCipherSm2GeneratorSpiImpl *impl, HcfKey *key, enum HcfCryptoMode opMode) in InitSm2Key() argument
69 if (opMode == ENCRYPT_MODE) { in InitSm2Key()
71 } else if (opMode == DECRYPT_MODE) { in InitSm2Key()
119 static HcfResult EngineInit(HcfCipherGeneratorSpi *self, enum HcfCryptoMode opMode, in EngineInit() argument
137 if (CheckCipherInitParams(opMode, key) != HCF_SUCCESS) { in EngineInit()
141 impl->attr.mode = (int32_t)opMode; in EngineInit()
142 if (InitSm2Key(impl, key, opMode) != HCF_SUCCESS) { in EngineInit()
H A Dcipher_rsa_openssl.c43 static HcfResult CheckCipherInitParams(enum HcfCryptoMode opMode, HcfKey *key) in CheckCipherInitParams() argument
45 switch (opMode) { in CheckCipherInitParams()
59 LOGE("Invalid opMode %u", opMode); in CheckCipherInitParams()
69 if (opMode == ENCRYPT_MODE) { in DuplicateRsaFromKey()
75 } else if (opMode == DECRYPT_MODE) { in DuplicateRsaFromKey()
93 ret = DuplicateRsaFromKey(key, opMode, &rsa); in InitEvpPkeyCtx()
113 if (opMode == ENCRYPT_MODE) { in InitEvpPkeyCtx()
325 static HcfResult EngineInit(HcfCipherGeneratorSpi *self, enum HcfCryptoMode opMode, in EngineInit() argument
344 if (CheckCipherInitParams(opMode, key) != HCF_SUCCESS) { in EngineInit()
348 impl->attr.mode = (int32_t)opMode; in EngineInit()
[all …]
H A Dcipher_sm4_openssl.c199 if (opMode == ENCRYPT_MODE) { in InitAadAndTagFromGcmParams()
213 static HcfResult InitCipherData(HcfCipherGeneratorSpi* self, enum HcfCryptoMode opMode, in InitCipherData() argument
225 (*cipherData)->enc = opMode; in InitCipherData()
243 ret = InitAadAndTagFromGcmParams(opMode, (HcfGcmParamsSpec *)params, *cipherData); in InitCipherData()
277 static HcfResult CheckParam(HcfCipherGeneratorSpi* self, enum HcfCryptoMode opMode, HcfKey* key) in CheckParam() argument
291 if (opMode != ENCRYPT_MODE && opMode != DECRYPT_MODE) { in CheckParam()
292 LOGE("Invalid opMode %d", opMode); in CheckParam()
355 static HcfResult EngineCipherInit(HcfCipherGeneratorSpi* self, enum HcfCryptoMode opMode, in EngineCipherInit() argument
358 if (CheckParam(self, opMode, key) != HCF_SUCCESS) { in EngineCipherInit()
363 int32_t enc = (opMode == ENCRYPT_MODE) ? 1 : 0; in EngineCipherInit()
[all …]
H A Dcipher_aes_openssl.c248 static HcfResult InitAadAndTagFromGcmParams(enum HcfCryptoMode opMode, HcfGcmParamsSpec *params, Ci… in InitAadAndTagFromGcmParams() argument
270 if (opMode == ENCRYPT_MODE) { in InitAadAndTagFromGcmParams()
301 if (opMode == ENCRYPT_MODE) { in InitAadAndTagFromCcmParams()
315 static HcfResult InitCipherData(HcfCipherGeneratorSpi *self, enum HcfCryptoMode opMode, in InitCipherData() argument
327 (*cipherData)->enc = opMode; in InitCipherData()
347 ret = InitAadAndTagFromCcmParams(opMode, (HcfCcmParamsSpec *)params, *cipherData); in InitCipherData()
350 ret = InitAadAndTagFromGcmParams(opMode, (HcfGcmParamsSpec *)params, *cipherData); in InitCipherData()
400 static HcfResult EngineCipherInit(HcfCipherGeneratorSpi *self, enum HcfCryptoMode opMode, in EngineCipherInit() argument
414 int enc = (opMode == ENCRYPT_MODE) ? 1 : 0; in EngineCipherInit()
416 if (InitCipherData(self, opMode, params, &(cipherImpl->cipherData)) != HCF_SUCCESS) { in EngineCipherInit()
[all …]
H A Dcipher_3des_openssl.c69 static HcfResult InitCipherData(enum HcfCryptoMode opMode, CipherData **cipherData) in InitCipherData() argument
79 (*cipherData)->enc = opMode; in InitCipherData()
94 static HcfResult EngineCipherInit(HcfCipherGeneratorSpi *self, enum HcfCryptoMode opMode, in EngineCipherInit() argument
112 int32_t enc = (opMode == ENCRYPT_MODE) ? 1 : 0; in EngineCipherInit()
118 if (InitCipherData(opMode, &(cipherImpl->cipherData)) != HCF_SUCCESS) { in EngineCipherInit()
/ohos5.0/foundation/multimedia/camera_framework/services/camera_service/src/
H A Dcamera_util.cpp244 bool IsValidMode(int32_t opMode, std::shared_ptr<OHOS::Camera::CameraMetadata> cameraAbility) in IsValidMode() argument
246 …if (opMode == 0 || opMode == 1 || opMode == 2) { // 0 is normal mode, 1 is capture mode, 2 is vide… in IsValidMode()
247 MEDIA_INFO_LOG("operationMode:%{public}d", opMode); in IsValidMode()
264 if (opMode == item.data.u8[i]) { in IsValidMode()
265 MEDIA_INFO_LOG("operationMode:%{public}d found in supported streams", opMode); in IsValidMode()
269 MEDIA_ERR_LOG("operationMode:%{public}d not found in supported streams", opMode); in IsValidMode()
H A Dhcamera_restore_param.cpp86 void HCameraRestoreParam::SetCameraOpMode(int32_t opMode) in SetCameraOpMode() argument
88 mOpMode = opMode; in SetCameraOpMode()
H A Dhcamera_host_manager.cpp93 bool IsNeedRestore(int32_t opMode,
392 int32_t opMode = cameraRestoreParam->GetCameraOpMode(); in Prelaunch() local
397 … MEDIA_INFO_LOG("CameraHostInfo::PrelaunchWithOpMode ICameraHost V1_2 %{public}d", opMode); in Prelaunch()
398 rc = (CamRetCode)(cameraHostProxyV1_2_->PrelaunchWithOpMode(prelaunchConfig, opMode)); in Prelaunch()
400 MEDIA_INFO_LOG("CameraHostInfo::Prelaunch ICameraHost V1_2 %{public}d", opMode); in Prelaunch()
416 bool HCameraHostManager::CameraHostInfo::IsNeedRestore(int32_t opMode, in IsNeedRestore() argument
426 if (opMode == 0) { // 0 is normal mode in IsNeedRestore()
427 MEDIA_INFO_LOG("operationMode:%{public}d", opMode); in IsNeedRestore()
444 if (opMode == item.data.u8[i]) { in IsNeedRestore()
445 MEDIA_DEBUG_LOG("operationMode:%{public}d found in supported streams", opMode); in IsNeedRestore()
[all …]
/ohos5.0/base/security/crypto_framework/frameworks/cj/src/
H A Dcipher_impl.cpp30 HcfResult CipherImpl::CipherInit(HcfCryptoMode opMode, HcfKey *key, HcfParamsSpec *params) in CipherInit() argument
36 HcfResult res = cipher_->init(cipher_, opMode, key, params); in CipherInit()
H A Dcrypto_ffi.cpp378 int32_t FfiOHOSCipherInitByIv(int64_t id, int32_t opMode, void* key, HcfBlob blob1) in FfiOHOSCipherInitByIv() argument
398 HcfCryptoMode mode = HcfCryptoMode(opMode); in FfiOHOSCipherInitByIv()
408 int32_t FfiOHOSCipherInitByGcm(int64_t id, int32_t opMode, void* key, CParamsSpec spec) in FfiOHOSCipherInitByGcm() argument
426 HcfCryptoMode mode = HcfCryptoMode(opMode); in FfiOHOSCipherInitByGcm()
452 int32_t FfiOHOSCipherInitByCcm(int64_t id, int32_t opMode, void* key, CParamsSpec spec) in FfiOHOSCipherInitByCcm() argument
471 HcfCryptoMode mode = HcfCryptoMode(opMode); in FfiOHOSCipherInitByCcm()
496 int32_t FfiOHOSCipherInitWithOutParams(int64_t id, int32_t opMode, void* key) in FfiOHOSCipherInitWithOutParams() argument
509 HcfCryptoMode mode = HcfCryptoMode(opMode); in FfiOHOSCipherInitWithOutParams()
/ohos5.0/foundation/multimedia/camera_framework/test/fuzztest/camerarestoreparam_fuzzer/
H A Dcamera_restore_param_fuzzer.cpp71 int32_t opMode = data.ReadInt32(); in Test() local
72 fuzz->SetCameraOpMode(opMode); in Test()
/ohos5.0/base/security/crypto_framework/frameworks/js/napi/crypto/src/
H A Dnapi_cipher.cpp48 enum HcfCryptoMode opMode = ENCRYPT_MODE; member
179 …if (napi_get_value_uint32(env, argv[index++], reinterpret_cast<uint32_t *>(&(context->opMode))) !=… in BuildContextForInit()
196 if (!GetParamsSpecFromNapiValue(env, argv[index], context->opMode, &context->paramsSpec)) { in BuildContextForInit()
348 context->errCode = cipher->init(cipher, context->opMode, key, params); in AsyncInitProcess()
538 static napi_value SyncInit(napi_env env, HcfCipher *cipher, HcfCryptoMode opMode, HcfKey *key, in SyncInit() argument
541 HcfResult res = cipher->init(cipher, opMode, key, paramsSpec); in SyncInit()
571 enum HcfCryptoMode opMode = ENCRYPT_MODE; in JsCipherInitSync() local
572 … if (napi_get_value_uint32(env, argv[index++], reinterpret_cast<uint32_t *>(&opMode)) != napi_ok) { in JsCipherInitSync()
591 if (!GetParamsSpecFromNapiValue(env, argv[index], opMode, &paramsSpec)) { in JsCipherInitSync()
597 napi_value instance = SyncInit(env, cipher, opMode, key, paramsSpec); in JsCipherInitSync()
H A Dnapi_utils.cpp404 static bool GetGcmParamsSpec(napi_env env, napi_value arg, HcfCryptoMode opMode, HcfParamsSpec **pa… in GetGcmParamsSpec() argument
424 if (opMode == DECRYPT_MODE) { in GetGcmParamsSpec()
430 } else if (opMode == ENCRYPT_MODE) { in GetGcmParamsSpec()
444 gcmParamsSpec->tag = opMode == DECRYPT_MODE ? *tag : authTag; in GetGcmParamsSpec()
460 static bool GetCcmParamsSpec(napi_env env, napi_value arg, HcfCryptoMode opMode, HcfParamsSpec **pa… in GetCcmParamsSpec() argument
479 if (opMode == DECRYPT_MODE) { in GetCcmParamsSpec()
485 } else if (opMode == ENCRYPT_MODE) { in GetCcmParamsSpec()
498 ccmParamsSpec->tag = opMode == DECRYPT_MODE ? *tag : authTag; in GetCcmParamsSpec()
514 bool GetParamsSpecFromNapiValue(napi_env env, napi_value arg, HcfCryptoMode opMode, HcfParamsSpec *… in GetParamsSpecFromNapiValue() argument
541 return GetGcmParamsSpec(env, arg, opMode, paramsSpec); in GetParamsSpecFromNapiValue()
[all …]
/ohos5.0/base/security/crypto_framework/frameworks/cj/include/
H A Dcrypto_ffi.h80 FFI_EXPORT int32_t FfiOHOSCipherInitByIv(int64_t id, int32_t opMode, void* key, HcfBlob blob1);
81 …FFI_EXPORT int32_t FfiOHOSCipherInitByGcm(int64_t id, int32_t opMode, void* key, CParamsSpec spec);
82 …FFI_EXPORT int32_t FfiOHOSCipherInitByCcm(int64_t id, int32_t opMode, void* key, CParamsSpec spec);
83 FFI_EXPORT int32_t FfiOHOSCipherInitWithOutParams(int64_t id, int32_t opMode, void* key);
H A Dcipher_impl.h31 HcfResult CipherInit(HcfCryptoMode opMode, HcfKey *key, HcfParamsSpec *params);
/ohos5.0/base/security/crypto_framework/frameworks/spi/
H A Dcipher_factory_spi.h32 HcfResult (*init)(HcfCipherGeneratorSpi *self, enum HcfCryptoMode opMode,
/ohos5.0/base/security/crypto_framework/interfaces/innerkits/crypto_operation/
H A Dcipher.h58 HcfResult (*init)(HcfCipher *self, enum HcfCryptoMode opMode,
/ohos5.0/foundation/multimedia/camera_framework/services/camera_service/include/
H A Dhcamera_restore_param.h53 void SetCameraOpMode(int32_t opMode);
H A Dhcapture_session.h224 static sptr<HCaptureSession> NewInstance(const uint32_t callerToken, int32_t opMode);
226 explicit HCaptureSession(const uint32_t callingTokenId, int32_t opMode);
290 int32_t Initialize(const uint32_t callerToken, int32_t opMode);
/ohos5.0/base/security/crypto_framework/frameworks/crypto_operation/
H A Dcipher.c275 static HcfResult CipherInit(HcfCipher *self, enum HcfCryptoMode opMode, in CipherInit() argument
287 return impl->spiObj->init(impl->spiObj, opMode, key, params); in CipherInit()
/ohos5.0/docs/en/application-dev/security/CryptoArchitectureKit/
H A Dcrypto-aes-sym-encrypt-decrypt-ecb.md16 …to initialize the **Cipher** instance. In the **Cipher.init** API, set **opMode** to **CryptoMode.…
24 …to initialize the **Cipher** instance. In the **Cipher.init** API, set **opMode** to **CryptoMode.…
H A Dcrypto-sm4-sym-encrypt-decrypt-ecb.md15 …init-1) to initialize the **Cipher** instance. In **Cipher.init**, set **opMode** to **CryptoMode.…
33 …init-1) to initialize the **Cipher** instance. In **Cipher.init**, set **opMode** to **CryptoMode.…
H A Dcrypto-3des-sym-encrypt-decrypt-ecb.md16 …init-1) to initialize the **Cipher** instance. In **Cipher.init**, set **opMode** to **CryptoMode.…
34 …init-1) to initialize the **Cipher** instance. In **Cipher.init**, set **opMode** to **CryptoMode.…
H A Dcrypto-aes-sym-encrypt-decrypt-cbc.md16 …to initialize the **Cipher** instance. In the **Cipher.init** API, set **opMode** to **CryptoMode.…
24 …to initialize the **Cipher** instance. In the **Cipher.init** API, set **opMode** to **CryptoMode.…
/ohos5.0/base/security/crypto_framework/frameworks/js/napi/crypto/inc/
H A Dnapi_utils.h56 bool GetParamsSpecFromNapiValue(napi_env env, napi_value arg, HcfCryptoMode opMode, HcfParamsSpec *…

123