diff --git a/frameworks/native/src/signature.c b/frameworks/native/src/signature.c index 105281c589864af5bb61956b6370f1290ea93d14..0168a17ba90b81dab0499c86aab751c8796136e1 100644 --- a/frameworks/native/src/signature.c +++ b/frameworks/native/src/signature.c @@ -354,20 +354,20 @@ struct OH_CryptoEccSignatureSpec { }; -OH_Crypto_ErrCode OH_CryptoEccSignatureSpec_Create(Crypto_DataBlob *EccSignature, OH_CryptoEccSignatureSpec **spec) +OH_Crypto_ErrCode OH_CryptoEccSignatureSpec_Create(Crypto_DataBlob *eccSignature, OH_CryptoEccSignatureSpec **spec) { if (spec == NULL) { return CRYPTO_PARAMETER_CHECK_FAILED; } HcfResult ret = HCF_INVALID_PARAMS; - if (EccSignature == NULL) { + if (eccSignature == NULL) { *spec = (OH_CryptoEccSignatureSpec *)HcfMalloc(sizeof(OH_CryptoEccSignatureSpec), 0); if (*spec == NULL) { return CRYPTO_MEMORY_ERROR; } return GetOhCryptoErrCodeNew(HCF_SUCCESS); } - ret = HcfGenEcSignatureSpecByData((HcfBlob *)EccSignature, (Sm2EcSignatureDataSpec **)spec); + ret = HcfGenEcSignatureSpecByData((HcfBlob *)eccSignature, (Sm2EcSignatureDataSpec **)spec); return GetOhCryptoErrCodeNew(ret); } diff --git a/interfaces/kits/native/include/crypto_digest.h b/interfaces/kits/native/include/crypto_digest.h index 4d44eddda768a68f49e5060a080bed928dd675c3..1af61159d717dfe12e8161b076556e38be7ef105 100644 --- a/interfaces/kits/native/include/crypto_digest.h +++ b/interfaces/kits/native/include/crypto_digest.h @@ -97,11 +97,8 @@ OH_Crypto_ErrCode OH_CryptoDigest_Final(OH_CryptoDigest *ctx, Crypto_DataBlob *o * @brief Get the digest length of the digest context. * * @param ctx Indicates the digest context. - * @return {@link OH_Crypto_ErrCode#CRYPTO_SUCCESS} 0 - If the operation is successful. - * {@link OH_Crypto_ErrCode#CRYPTO_INVALID_PARAMS} 401 - If parameter is invalid. - * {@link OH_Crypto_ErrCode#CRYPTO_NOT_SUPPORTED} 801 - If the operation is not supported. - * {@link OH_Crypto_ErrCode#CRYPTO_MEMORY_ERROR} 17620001 - If memory operation failed. - * {@link OH_Crypto_ErrCode#CRYPTO_OPERTION_ERROR} 17630001 - If crypto opertion failed. + * @return Return the digest length. + * If the input parameter ctx is NULL, 401 is returned, in other failure scenarios, 0 is returned. * @since 12 */ uint32_t OH_CryptoDigest_GetLength(OH_CryptoDigest *ctx); @@ -119,11 +116,6 @@ const char *OH_CryptoDigest_GetAlgoName(OH_CryptoDigest *ctx); * @brief Destroy the digest context. * * @param ctx Indicates the digest context. - * @return {@link OH_Crypto_ErrCode#CRYPTO_SUCCESS} 0 - If the operation is successful. - * {@link OH_Crypto_ErrCode#CRYPTO_INVALID_PARAMS} 401 - If parameter is invalid. - * {@link OH_Crypto_ErrCode#CRYPTO_NOT_SUPPORTED} 801 - If the operation is not supported. - * {@link OH_Crypto_ErrCode#CRYPTO_MEMORY_ERROR} 17620001 - If memory operation failed. - * {@link OH_Crypto_ErrCode#CRYPTO_OPERTION_ERROR} 17630001 - If crypto opertion failed. * @since 12 */ void OH_DigestCrypto_Destroy(OH_CryptoDigest *ctx); diff --git a/interfaces/kits/native/include/crypto_signature.h b/interfaces/kits/native/include/crypto_signature.h index 7982b278f2c9dc5dc9d7347cf010e4f9a27d4d40..904488648d32fe387da5a8fa36231452dd9e2d3c 100644 --- a/interfaces/kits/native/include/crypto_signature.h +++ b/interfaces/kits/native/include/crypto_signature.h @@ -323,7 +323,7 @@ typedef struct OH_CryptoEccSignatureSpec OH_CryptoEccSignatureSpec; /** * @brief Creates the ECC signature spec, also support SM2 signature. * - * @param EccSignature Indicates the ECC signature in DER format, if EccSignature parameter is NULL, + * @param eccSignature Indicates the ECC signature in DER format, if eccSignature parameter is NULL, * an empty ECC signature spec will be created. * @param spec Indicates the output ECC signature spec. * @return {@link OH_Crypto_ErrCode#CRYPTO_SUCCESS} 0 - If the operation is successful. @@ -333,7 +333,7 @@ typedef struct OH_CryptoEccSignatureSpec OH_CryptoEccSignatureSpec; * {@link OH_Crypto_ErrCode#CRYPTO_OPERTION_ERROR} 17630001 - If crypto operation failed. * @since 20 */ -OH_Crypto_ErrCode OH_CryptoEccSignatureSpec_Create(Crypto_DataBlob *EccSignature, +OH_Crypto_ErrCode OH_CryptoEccSignatureSpec_Create(Crypto_DataBlob *eccSignature, OH_CryptoEccSignatureSpec **spec); /**