From e6b430d4d80c2fa49b7fce656ad15ad4299f1e3b Mon Sep 17 00:00:00 2001 From: lcc Date: Mon, 9 Jun 2025 14:42:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9public-c=20api=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lcc --- CryptoArchitectureKit/crypto_architecture_kit.h | 3 +-- CryptoArchitectureKit/crypto_asym_cipher.h | 1 + CryptoArchitectureKit/crypto_digest.h | 12 ++---------- CryptoArchitectureKit/crypto_signature.h | 4 ++-- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/CryptoArchitectureKit/crypto_architecture_kit.h b/CryptoArchitectureKit/crypto_architecture_kit.h index 6ed853395..ae3f93243 100644 --- a/CryptoArchitectureKit/crypto_architecture_kit.h +++ b/CryptoArchitectureKit/crypto_architecture_kit.h @@ -19,7 +19,6 @@ * * @brief Provides an entry to the crypto header files for you to reference. * - * @syscap SystemCapability.Security.CryptoFramework * @since 12 */ @@ -53,4 +52,4 @@ /** @} */ -#endif /* CRYPTO_ARCHITECTURE_KIT_H*/ \ No newline at end of file +#endif /* CRYPTO_ARCHITECTURE_KIT_H */ \ No newline at end of file diff --git a/CryptoArchitectureKit/crypto_asym_cipher.h b/CryptoArchitectureKit/crypto_asym_cipher.h index d6ab30721..3846be173 100644 --- a/CryptoArchitectureKit/crypto_asym_cipher.h +++ b/CryptoArchitectureKit/crypto_asym_cipher.h @@ -102,6 +102,7 @@ OH_Crypto_ErrCode OH_CryptoAsymCipher_Final(OH_CryptoAsymCipher *ctx, const Cryp * @brief Destroys the asymmetric cipher context. * * @param ctx Indicates the asymmetric cipher context. + * @since 20 */ void OH_CryptoAsymCipher_Destroy(OH_CryptoAsymCipher *ctx); diff --git a/CryptoArchitectureKit/crypto_digest.h b/CryptoArchitectureKit/crypto_digest.h index 52227bfe8..bac24951a 100644 --- a/CryptoArchitectureKit/crypto_digest.h +++ b/CryptoArchitectureKit/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/CryptoArchitectureKit/crypto_signature.h b/CryptoArchitectureKit/crypto_signature.h index 7982b278f..904488648 100644 --- a/CryptoArchitectureKit/crypto_signature.h +++ b/CryptoArchitectureKit/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); /** -- Gitee