1526fd984Sopenharmony_ci/* 2526fd984Sopenharmony_ci * Copyright (c) 2022-2024 Huawei Device Co., Ltd. 3526fd984Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4526fd984Sopenharmony_ci * you may not use this file except in compliance with the License. 5526fd984Sopenharmony_ci * You may obtain a copy of the License at 6526fd984Sopenharmony_ci * 7526fd984Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8526fd984Sopenharmony_ci * 9526fd984Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10526fd984Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11526fd984Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12526fd984Sopenharmony_ci * See the License for the specific language governing permissions and 13526fd984Sopenharmony_ci * limitations under the License. 14526fd984Sopenharmony_ci */ 15526fd984Sopenharmony_ci 16526fd984Sopenharmony_ci#ifndef NATIVE_HUKS_API_H 17526fd984Sopenharmony_ci#define NATIVE_HUKS_API_H 18526fd984Sopenharmony_ci 19526fd984Sopenharmony_ci/** 20526fd984Sopenharmony_ci * @addtogroup HuksKeyApi 21526fd984Sopenharmony_ci * @{ 22526fd984Sopenharmony_ci * 23526fd984Sopenharmony_ci * @brief Describes the OpenHarmony Universal KeyStore (HUKS) capabilities, including key management and 24526fd984Sopenharmony_ci * cryptography operations, provided for applications. 25526fd984Sopenharmony_ci * The keys managed by HUKS can be imported by applications or generated by calling the HUKS APIs. 26526fd984Sopenharmony_ci * 27526fd984Sopenharmony_ci * @syscap SystemCapability.Security.Huks 28526fd984Sopenharmony_ci * @since 9 29526fd984Sopenharmony_ci * @version 1.0 30526fd984Sopenharmony_ci */ 31526fd984Sopenharmony_ci 32526fd984Sopenharmony_ci/** 33526fd984Sopenharmony_ci * @file native_huks_api.h 34526fd984Sopenharmony_ci * 35526fd984Sopenharmony_ci * @brief Defines the Universal Keystore Kit APIs. 36526fd984Sopenharmony_ci * 37526fd984Sopenharmony_ci * include "huks/include/native_huks_type.h" 38526fd984Sopenharmony_ci * @kit Universal Keystore Kit 39526fd984Sopenharmony_ci * @since 9 40526fd984Sopenharmony_ci * @version 1.0 41526fd984Sopenharmony_ci */ 42526fd984Sopenharmony_ci 43526fd984Sopenharmony_ci#include "native_huks_type.h" 44526fd984Sopenharmony_ci 45526fd984Sopenharmony_ci#ifdef __cplusplus 46526fd984Sopenharmony_ciextern "C" { 47526fd984Sopenharmony_ci#endif 48526fd984Sopenharmony_ci 49526fd984Sopenharmony_ci/** 50526fd984Sopenharmony_ci * @brief Obtains the current HUKS SDK version. 51526fd984Sopenharmony_ci * 52526fd984Sopenharmony_ci * @param sdkVersion Indicates the pointer to the SDK version (in string format) obtained. 53526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 54526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If sdkVersion or 55526fd984Sopenharmony_ci * sdkVersion->data is null, or if sdkVersion->size is too small. 56526fd984Sopenharmony_ci * @since 9 57526fd984Sopenharmony_ci * @version 1.0 58526fd984Sopenharmony_ci */ 59526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_GetSdkVersion(struct OH_Huks_Blob *sdkVersion); 60526fd984Sopenharmony_ci 61526fd984Sopenharmony_ci/** 62526fd984Sopenharmony_ci * @brief Generates a key. 63526fd984Sopenharmony_ci * 64526fd984Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the key to generate. 65526fd984Sopenharmony_ci * The alias must be unique in the process of the service. Otherwise, the key will be overwritten. 66526fd984Sopenharmony_ci * @param paramSetIn Indicates the pointer to the parameter set for generating the key. 67526fd984Sopenharmony_ci * @param paramSetOut Indicates the pointer to a temporary key generated. If the generated key is 68526fd984Sopenharmony_ci * not of a temporary type, this parameter is a null pointer. 69526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 70526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSetIn or 71526fd984Sopenharmony_ci * paramSetOut is invalid. 72526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 73526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL} 12000004 - If failed to remove file, 74526fd984Sopenharmony_ci * or if failed to write file. 75526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 76526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the base key file is not exit. 77526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 78526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 79526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. 80526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 81526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CALL_SERVICE_FAILED} 12000015 - If connect userIam failed. 82526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET} 12000016 - If device password is required 83526fd984Sopenharmony_ci * but not set. 84526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. 85526fd984Sopenharmony_ci * @since 9 86526fd984Sopenharmony_ci * @version 1.0 87526fd984Sopenharmony_ci */ 88526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_GenerateKeyItem(const struct OH_Huks_Blob *keyAlias, 89526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSetIn, struct OH_Huks_ParamSet *paramSetOut); 90526fd984Sopenharmony_ci 91526fd984Sopenharmony_ci/** 92526fd984Sopenharmony_ci * @brief Imports a key in plaintext. 93526fd984Sopenharmony_ci * 94526fd984Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the key to import. 95526fd984Sopenharmony_ci * The alias must be unique in the process of the service. Otherwise, the key will be overwritten. 96526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters of the key to import. 97526fd984Sopenharmony_ci * @param key Indicates the pointer to the key to import. The key must be in the format required by the HUKS. 98526fd984Sopenharmony_ci * For details, see {@link HuksTypeApi}. 99526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 100526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or key is invalid. 101526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 102526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL} 12000004 - If failed to remove file, 103526fd984Sopenharmony_ci * or if failed to write file. 104526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 105526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 106526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 107526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 108526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CALL_SERVICE_FAILED} 12000015 - If connect userIam failed. 109526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. 110526fd984Sopenharmony_ci * @since 9 111526fd984Sopenharmony_ci * @version 1.0 112526fd984Sopenharmony_ci */ 113526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_ImportKeyItem(const struct OH_Huks_Blob *keyAlias, 114526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSet, const struct OH_Huks_Blob *key); 115526fd984Sopenharmony_ci 116526fd984Sopenharmony_ci/** 117526fd984Sopenharmony_ci * @brief Imports a wrapped key. 118526fd984Sopenharmony_ci * 119526fd984Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the key to import. 120526fd984Sopenharmony_ci * The alias must be unique in the process of the service. Otherwise, the key will be overwritten. 121526fd984Sopenharmony_ci * @param wrappingKeyAlias Indicates the pointer to the alias of the wrapping key, 122526fd984Sopenharmony_ci * which is obtained through key agreement and used to decrypt the key to import. 123526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters of the wrapped key to import. 124526fd984Sopenharmony_ci * @param wrappedKeyData Indicates the pointer to the wrapped key to import. 125526fd984Sopenharmony_ci * The key must be in the format required by the HUKS. For details, see {@link OH_Huks_AlgSuite}. 126526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 127526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or wrappingKeyAlias or 128526fd984Sopenharmony_ci * paramSet or wrappedKeyData is invalid. 129526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 130526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL} 12000004 - If failed to remove file, 131526fd984Sopenharmony_ci * or if failed to write file. 132526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 133526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 134526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 135526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. 136526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 137526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CALL_SERVICE_FAILED} 12000015 - If connect userIam failed. 138526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. 139526fd984Sopenharmony_ci * @since 9 140526fd984Sopenharmony_ci * @version 1.0 141526fd984Sopenharmony_ci */ 142526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_ImportWrappedKeyItem(const struct OH_Huks_Blob *keyAlias, 143526fd984Sopenharmony_ci const struct OH_Huks_Blob *wrappingKeyAlias, const struct OH_Huks_ParamSet *paramSet, 144526fd984Sopenharmony_ci const struct OH_Huks_Blob *wrappedKeyData); 145526fd984Sopenharmony_ci 146526fd984Sopenharmony_ci/** 147526fd984Sopenharmony_ci * @brief Exports a public key. 148526fd984Sopenharmony_ci * 149526fd984Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the public key to export. 150526fd984Sopenharmony_ci * The alias must be the same as the alias for the key generated. 151526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for exporting the public key. 152526fd984Sopenharmony_ci * @param key Indicates the pointer to the public key exported. 153526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 154526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or key is invalid. 155526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 156526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. 157526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 158526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 159526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 160526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 161526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. 162526fd984Sopenharmony_ci * @since 9 163526fd984Sopenharmony_ci * @version 1.0 164526fd984Sopenharmony_ci */ 165526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_ExportPublicKeyItem(const struct OH_Huks_Blob *keyAlias, 166526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSet, struct OH_Huks_Blob *key); 167526fd984Sopenharmony_ci 168526fd984Sopenharmony_ci/** 169526fd984Sopenharmony_ci * @brief Deletes a key. 170526fd984Sopenharmony_ci * 171526fd984Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the key to delete. 172526fd984Sopenharmony_ci * The alias must be the same as the alias for the key generated. 173526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for deleting the key. 174526fd984Sopenharmony_ci * By default, this parameter is a null pointer. 175526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 176526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet is invalid. 177526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 178526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 179526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. 180526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 181526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 182526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 183526fd984Sopenharmony_ci * @since 9 184526fd984Sopenharmony_ci * @version 1.0 185526fd984Sopenharmony_ci */ 186526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_DeleteKeyItem(const struct OH_Huks_Blob *keyAlias, 187526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSet); 188526fd984Sopenharmony_ci 189526fd984Sopenharmony_ci/** 190526fd984Sopenharmony_ci * @brief Obtains the attributes of a key. 191526fd984Sopenharmony_ci * 192526fd984Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the target key. 193526fd984Sopenharmony_ci * @param paramSetIn Indicates the pointer to the attribute tag required for 194526fd984Sopenharmony_ci * obtaining the attributes. By default, this parameter is a null pointer. 195526fd984Sopenharmony_ci * @param paramSetOut Indicates the pointer to the attributes obtained. 196526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 197526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSetIn or 198526fd984Sopenharmony_ci * paramSetOut is invalid. 199526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 200526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 201526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. 202526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 203526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 204526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 205526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. 206526fd984Sopenharmony_ci * @since 9 207526fd984Sopenharmony_ci * @version 1.0 208526fd984Sopenharmony_ci */ 209526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_GetKeyItemParamSet(const struct OH_Huks_Blob *keyAlias, 210526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSetIn, struct OH_Huks_ParamSet *paramSetOut); 211526fd984Sopenharmony_ci 212526fd984Sopenharmony_ci/** 213526fd984Sopenharmony_ci * @brief Checks whether a key exists. 214526fd984Sopenharmony_ci * 215526fd984Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the target key. 216526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the attribute tag required for checking the key. 217526fd984Sopenharmony_ci * By default, this parameter is a null pointer. 218526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 219526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet is invalid. 220526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 221526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 222526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. 223526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 224526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 225526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 226526fd984Sopenharmony_ci * @since 9 227526fd984Sopenharmony_ci * @version 1.0 228526fd984Sopenharmony_ci */ 229526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_IsKeyItemExist(const struct OH_Huks_Blob *keyAlias, 230526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSet); 231526fd984Sopenharmony_ci 232526fd984Sopenharmony_ci/** 233526fd984Sopenharmony_ci * @brief Obtain the key certificate chain. 234526fd984Sopenharmony_ci * 235526fd984Sopenharmony_ci * @permission ohos.permission.ATTEST_KEY 236526fd984Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the target key. 237526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for obtaining the key certificate. 238526fd984Sopenharmony_ci * @param certChain Indicates the pointer to the key certificate chain obtained. 239526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 240526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or certChain is invalid. 241526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 242526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 243526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. 244526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 245526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 246526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. 247526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 248526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. 249526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_PERMISSION_FAIL} 201 - If the permission check failed, 250526fd984Sopenharmony_ci * please apply for the required permissions first. 251526fd984Sopenharmony_ci * @since 9 252526fd984Sopenharmony_ci * @version 1.0 253526fd984Sopenharmony_ci */ 254526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_AttestKeyItem(const struct OH_Huks_Blob *keyAlias, 255526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSet, struct OH_Huks_CertChain *certChain); 256526fd984Sopenharmony_ci 257526fd984Sopenharmony_ci/** 258526fd984Sopenharmony_ci * @brief Obtain the key certificate chain. 259526fd984Sopenharmony_ci * 260526fd984Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the target key. 261526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for obtaining the key certificate. 262526fd984Sopenharmony_ci * @param certChain Indicates the pointer to the key certificate chain obtained. 263526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 264526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or certChain is invalid. 265526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 266526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 267526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. 268526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 269526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 270526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. 271526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 272526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. 273526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_PERMISSION_FAIL} 201 - If the permission check failed, 274526fd984Sopenharmony_ci * please apply for the required permissions first. 275526fd984Sopenharmony_ci * @since 11 276526fd984Sopenharmony_ci * @version 1.0 277526fd984Sopenharmony_ci * @note this is a networking duration interface caller need to get the certChain in asynchronous thread 278526fd984Sopenharmony_ci */ 279526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_AnonAttestKeyItem(const struct OH_Huks_Blob *keyAlias, 280526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSet, struct OH_Huks_CertChain *certChain); 281526fd984Sopenharmony_ci 282526fd984Sopenharmony_ci/** 283526fd984Sopenharmony_ci * @brief Initializes the key session interface and obtains a handle (mandatory) and challenge value (optional). 284526fd984Sopenharmony_ci * 285526fd984Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the target key. 286526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters for the initialization operation. 287526fd984Sopenharmony_ci * @param handle Indicates the pointer to the handle of the key session obtained. 288526fd984Sopenharmony_ci * This handle is required for subsequent operations, including {@link OH_Huks_UpdateSession}, 289526fd984Sopenharmony_ci * {@link OH_Huks_FinishSession}, and {@link OH_Huks_AbortSession}. 290526fd984Sopenharmony_ci * @param challenge Indicates the pointer to the challenge value obtained. 291526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 292526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or handle or 293526fd984Sopenharmony_ci * token is invalid. 294526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 295526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 296526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit. 297526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 298526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 299526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_SESSION_LIMIT} 12000010 - If reached max session limit. 300526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. 301526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 302526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. 303526fd984Sopenharmony_ci * @since 9 304526fd984Sopenharmony_ci * @version 1.0 305526fd984Sopenharmony_ci * @see OH_Huks_UpdateSession 306526fd984Sopenharmony_ci * @see OH_Huks_FinishSession 307526fd984Sopenharmony_ci * @see OH_Huks_AbortSession 308526fd984Sopenharmony_ci */ 309526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_InitSession(const struct OH_Huks_Blob *keyAlias, 310526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSet, struct OH_Huks_Blob *handle, struct OH_Huks_Blob *token); 311526fd984Sopenharmony_ci 312526fd984Sopenharmony_ci/** 313526fd984Sopenharmony_ci * @brief Adds data by segment for the key operation, performs the related key operation, 314526fd984Sopenharmony_ci * and outputs the processed data. 315526fd984Sopenharmony_ci * 316526fd984Sopenharmony_ci * @param handle Indicates the pointer to the key session handle, which is generated by {@link OH_Huks_InitSession}. 317526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for the key operation. 318526fd984Sopenharmony_ci * @param inData Indicates the pointer to the data to be processed. 319526fd984Sopenharmony_ci * This API can be called multiples time to process large data by segment. 320526fd984Sopenharmony_ci * @param outData Indicates the pointer to the output data. 321526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 322526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If handle or paramSet or inData or 323526fd984Sopenharmony_ci * outData is invalid. 324526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 325526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 326526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit, 327526fd984Sopenharmony_ci * or if the handle is not exist. 328526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 329526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 330526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST} 12000013 - If credemtial is not exist. 331526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. 332526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_VERIFY_FAILED} 12000008 - If auth token verify failed. 333526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_PERMANENTLY_INVALIDATED} 12000007 - If auth token info 334526fd984Sopenharmony_ci * verify failed. 335526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_TIME_OUT} 12000009 - If authentication token timed out. 336526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 337526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET} 12000016 - If device password is required 338526fd984Sopenharmony_ci * but not set. 339526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. 340526fd984Sopenharmony_ci * @since 9 341526fd984Sopenharmony_ci * @version 1.0 342526fd984Sopenharmony_ci * @see OH_Huks_InitSession 343526fd984Sopenharmony_ci * @see OH_Huks_FinishSession 344526fd984Sopenharmony_ci * @see OH_Huks_AbortSession 345526fd984Sopenharmony_ci */ 346526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_UpdateSession(const struct OH_Huks_Blob *handle, 347526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSet, const struct OH_Huks_Blob *inData, struct OH_Huks_Blob *outData); 348526fd984Sopenharmony_ci 349526fd984Sopenharmony_ci/** 350526fd984Sopenharmony_ci * @brief Ends the key session. 351526fd984Sopenharmony_ci * 352526fd984Sopenharmony_ci * @param handle Indicates the pointer to the key session handle, which is generated by {@link OH_Huks_InitSession}. 353526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for the key operation. 354526fd984Sopenharmony_ci * @param inData Indicates the pointer to the data to be processed. 355526fd984Sopenharmony_ci * @param outData Indicates the pointer to the output data. 356526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 357526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If handle or paramSet or inData or 358526fd984Sopenharmony_ci * outData is invalid. 359526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 360526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 361526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit, 362526fd984Sopenharmony_ci * or if the handle is not exist. 363526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 364526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 365526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST} 12000013 - If credemtial is not exist. 366526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed. 367526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_VERIFY_FAILED} 12000008 - If auth token verify failed. 368526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_PERMANENTLY_INVALIDATED} 12000007 - If auth token info 369526fd984Sopenharmony_ci * verify failed. 370526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_TIME_OUT} 12000009 - If authentication token timed out. 371526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 372526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET} 12000016 - If device password is required 373526fd984Sopenharmony_ci * but not set. 374526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support. 375526fd984Sopenharmony_ci * @since 9 376526fd984Sopenharmony_ci * @version 1.0 377526fd984Sopenharmony_ci * @see OH_Huks_InitSession 378526fd984Sopenharmony_ci * @see OH_Huks_UpdateSession 379526fd984Sopenharmony_ci * @see OH_Huks_AbortSession 380526fd984Sopenharmony_ci */ 381526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_FinishSession(const struct OH_Huks_Blob *handle, 382526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSet, const struct OH_Huks_Blob *inData, struct OH_Huks_Blob *outData); 383526fd984Sopenharmony_ci 384526fd984Sopenharmony_ci/** 385526fd984Sopenharmony_ci * @brief Aborts a key session. 386526fd984Sopenharmony_ci * 387526fd984Sopenharmony_ci * @param handle Indicates the pointer to the key session handle, which is generated by {@link OH_Huks_InitSession}. 388526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for aborting the key session. 389526fd984Sopenharmony_ci * By default, this parameter is a null pointer. 390526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 391526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If handle or paramSet or inData or 392526fd984Sopenharmony_ci * outData is invalid. 393526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 394526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument is invalid. 395526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - or if the handle is not exist. 396526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to get key argument. 397526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 398526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST} 12000013 - If credemtial is not exist. 399526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 400526fd984Sopenharmony_ci * @since 9 401526fd984Sopenharmony_ci * @version 1.0 402526fd984Sopenharmony_ci * @see OH_Huks_InitSession 403526fd984Sopenharmony_ci * @see OH_Huks_UpdateSession 404526fd984Sopenharmony_ci * @see OH_Huks_FinishSession 405526fd984Sopenharmony_ci */ 406526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_AbortSession(const struct OH_Huks_Blob *handle, 407526fd984Sopenharmony_ci const struct OH_Huks_ParamSet *paramSet); 408526fd984Sopenharmony_ci 409526fd984Sopenharmony_ci/** 410526fd984Sopenharmony_ci * @brief Get key alias list. 411526fd984Sopenharmony_ci * 412526fd984Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for getting key alias list. 413526fd984Sopenharmony_ci * By default, this parameter is a null pointer. 414526fd984Sopenharmony_ci * @param outData Indicates the pointer to the output data. 415526fd984Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful. 416526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If paramSet or outData is invalid. 417526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred. 418526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed. 419526fd984Sopenharmony_ci * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient. 420526fd984Sopenharmony_ci * @since 12 421526fd984Sopenharmony_ci * @version 1.0 422526fd984Sopenharmony_ci */ 423526fd984Sopenharmony_cistruct OH_Huks_Result OH_Huks_ListAliases(const struct OH_Huks_ParamSet *paramSet, 424526fd984Sopenharmony_ci struct OH_Huks_KeyAliasSet **outData); 425526fd984Sopenharmony_ci 426526fd984Sopenharmony_ci#ifdef __cplusplus 427526fd984Sopenharmony_ci} 428526fd984Sopenharmony_ci#endif 429526fd984Sopenharmony_ci 430526fd984Sopenharmony_ci/** @} */ 431526fd984Sopenharmony_ci#endif /* NATIVE_HUKS_API_H */ 432