From 908ce86d982eebc60a4a2619af1a7a3c14912d9e Mon Sep 17 00:00:00 2001 From: lanlanlan Date: Tue, 10 Oct 2023 09:20:48 +0000 Subject: [PATCH] modfiy error code of md&hmac Signed-off-by: lanlanlan --- frameworks/crypto_operation/mac.c | 4 ++-- frameworks/crypto_operation/md.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/crypto_operation/mac.c b/frameworks/crypto_operation/mac.c index 785b756..06d60cb 100644 --- a/frameworks/crypto_operation/mac.c +++ b/frameworks/crypto_operation/mac.c @@ -158,8 +158,8 @@ HcfResult HcfMacCreate(const char *algoName, HcfMac **mac) } HcfMacSpiCreateFunc createSpiFunc = FindAbility(algoName); if (createSpiFunc == NULL) { - LOGE("Algo not supported!"); - return HCF_NOT_SUPPORT; + LOGE("Algo name is error!"); + return HCF_INVALID_PARAMS; } HcfMacImpl *returnMacApi = (HcfMacImpl *)HcfMalloc(sizeof(HcfMacImpl), 0); if (returnMacApi == NULL) { diff --git a/frameworks/crypto_operation/md.c b/frameworks/crypto_operation/md.c index fb85429..5db5b77 100644 --- a/frameworks/crypto_operation/md.c +++ b/frameworks/crypto_operation/md.c @@ -146,8 +146,8 @@ HcfResult HcfMdCreate(const char *algoName, HcfMd **md) } HcfMdSpiCreateFunc createSpiFunc = FindAbility(algoName); if (createSpiFunc == NULL) { - LOGE("Algo not supported!"); - return HCF_NOT_SUPPORT; + LOGE("Algo name is error!"); + return HCF_INVALID_PARAMS; } HcfMdImpl *returnMdApi = (HcfMdImpl *)HcfMalloc(sizeof(HcfMdImpl), 0); if (returnMdApi == NULL) { -- Gitee