17777dab0Sopenharmony_ci/*
27777dab0Sopenharmony_ci * Copyright (c) 2022-2024 Huawei Device Co., Ltd.
37777dab0Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
47777dab0Sopenharmony_ci * you may not use this file except in compliance with the License.
57777dab0Sopenharmony_ci * You may obtain a copy of the License at
67777dab0Sopenharmony_ci *
77777dab0Sopenharmony_ci *    http://www.apache.org/licenses/LICENSE-2.0
87777dab0Sopenharmony_ci *
97777dab0Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
107777dab0Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
117777dab0Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127777dab0Sopenharmony_ci * See the License for the specific language governing permissions and
137777dab0Sopenharmony_ci * limitations under the License.
147777dab0Sopenharmony_ci */
157777dab0Sopenharmony_ci
167777dab0Sopenharmony_ci#ifndef NATIVE_HUKS_API_H
177777dab0Sopenharmony_ci#define NATIVE_HUKS_API_H
187777dab0Sopenharmony_ci
197777dab0Sopenharmony_ci/**
207777dab0Sopenharmony_ci * @addtogroup HuksKeyApi
217777dab0Sopenharmony_ci * @{
227777dab0Sopenharmony_ci *
237777dab0Sopenharmony_ci * @brief Describes the OpenHarmony Universal KeyStore (HUKS) capabilities, including key management and
247777dab0Sopenharmony_ci *    cryptography operations, provided for applications.
257777dab0Sopenharmony_ci *    The keys managed by HUKS can be imported by applications or generated by calling the HUKS APIs.
267777dab0Sopenharmony_ci *
277777dab0Sopenharmony_ci * @syscap SystemCapability.Security.Huks
287777dab0Sopenharmony_ci * @since 9
297777dab0Sopenharmony_ci * @version 1.0
307777dab0Sopenharmony_ci */
317777dab0Sopenharmony_ci
327777dab0Sopenharmony_ci/**
337777dab0Sopenharmony_ci * @file native_huks_api.h
347777dab0Sopenharmony_ci *
357777dab0Sopenharmony_ci * @brief Defines the Universal Keystore Kit APIs.
367777dab0Sopenharmony_ci *
377777dab0Sopenharmony_ci * include "huks/include/native_huks_type.h"
387777dab0Sopenharmony_ci * @kit UniversalKeystoreKit
397777dab0Sopenharmony_ci * @since 9
407777dab0Sopenharmony_ci * @version 1.0
417777dab0Sopenharmony_ci */
427777dab0Sopenharmony_ci
437777dab0Sopenharmony_ci#include "native_huks_type.h"
447777dab0Sopenharmony_ci
457777dab0Sopenharmony_ci#ifdef __cplusplus
467777dab0Sopenharmony_ciextern "C" {
477777dab0Sopenharmony_ci#endif
487777dab0Sopenharmony_ci
497777dab0Sopenharmony_ci/**
507777dab0Sopenharmony_ci * @brief Obtains the current HUKS SDK version.
517777dab0Sopenharmony_ci *
527777dab0Sopenharmony_ci * @param sdkVersion Indicates the pointer to the SDK version (in string format) obtained.
537777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
547777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If sdkVersion or
557777dab0Sopenharmony_ci *         sdkVersion->data is null, or if sdkVersion->size is too small.
567777dab0Sopenharmony_ci * @since 9
577777dab0Sopenharmony_ci * @version 1.0
587777dab0Sopenharmony_ci */
597777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_GetSdkVersion(struct OH_Huks_Blob *sdkVersion);
607777dab0Sopenharmony_ci
617777dab0Sopenharmony_ci/**
627777dab0Sopenharmony_ci * @brief Generates a key.
637777dab0Sopenharmony_ci *
647777dab0Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the key to generate.
657777dab0Sopenharmony_ci *    The alias must be unique in the process of the service. Otherwise, the key will be overwritten.
667777dab0Sopenharmony_ci * @param paramSetIn Indicates the pointer to the parameter set for generating the key.
677777dab0Sopenharmony_ci * @param paramSetOut Indicates the pointer to a temporary key generated. If the generated key is
687777dab0Sopenharmony_ci *    not of a temporary type, this parameter is a null pointer.
697777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
707777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSetIn or
717777dab0Sopenharmony_ci *         paramSetOut is invalid.
727777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
737777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL} 12000004 - If failed to remove file,
747777dab0Sopenharmony_ci *         or if failed to write file.
757777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
767777dab0Sopenharmony_ci *         is invalid.
777777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the base key file is not exit.
787777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
797777dab0Sopenharmony_ci *         get key argument.
807777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
817777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed.
827777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
837777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CALL_SERVICE_FAILED} 12000015 - If connect userIam failed.
847777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET} 12000016 - If device password is required
857777dab0Sopenharmony_ci *         but not set.
867777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support.
877777dab0Sopenharmony_ci * @since 9
887777dab0Sopenharmony_ci * @version 1.0
897777dab0Sopenharmony_ci */
907777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_GenerateKeyItem(const struct OH_Huks_Blob *keyAlias,
917777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSetIn, struct OH_Huks_ParamSet *paramSetOut);
927777dab0Sopenharmony_ci
937777dab0Sopenharmony_ci/**
947777dab0Sopenharmony_ci * @brief Imports a key in plaintext.
957777dab0Sopenharmony_ci *
967777dab0Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the key to import.
977777dab0Sopenharmony_ci *    The alias must be unique in the process of the service. Otherwise, the key will be overwritten.
987777dab0Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters of the key to import.
997777dab0Sopenharmony_ci * @param key Indicates the pointer to the key to import. The key must be in the format required by the HUKS.
1007777dab0Sopenharmony_ci *    For details, see {@link HuksTypeApi}.
1017777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
1027777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or
1037777dab0Sopenharmony_ci *         key is invalid.
1047777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
1057777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL} 12000004 - If failed to remove file,
1067777dab0Sopenharmony_ci *         or if failed to write file.
1077777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
1087777dab0Sopenharmony_ci *         is invalid.
1097777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
1107777dab0Sopenharmony_ci *         get key argument.
1117777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
1127777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
1137777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CALL_SERVICE_FAILED} 12000015 - If connect userIam failed.
1147777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support.
1157777dab0Sopenharmony_ci * @since 9
1167777dab0Sopenharmony_ci * @version 1.0
1177777dab0Sopenharmony_ci */
1187777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_ImportKeyItem(const struct OH_Huks_Blob *keyAlias,
1197777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSet, const struct OH_Huks_Blob *key);
1207777dab0Sopenharmony_ci
1217777dab0Sopenharmony_ci/**
1227777dab0Sopenharmony_ci * @brief Imports a wrapped key.
1237777dab0Sopenharmony_ci *
1247777dab0Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the key to import.
1257777dab0Sopenharmony_ci *    The alias must be unique in the process of the service. Otherwise, the key will be overwritten.
1267777dab0Sopenharmony_ci * @param wrappingKeyAlias Indicates the pointer to the alias of the wrapping key,
1277777dab0Sopenharmony_ci *    which is obtained through key agreement and used to decrypt the key to import.
1287777dab0Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters of the wrapped key to import.
1297777dab0Sopenharmony_ci * @param wrappedKeyData Indicates the pointer to the wrapped key to import.
1307777dab0Sopenharmony_ci *    The key must be in the format required by the HUKS. For details, see {@link OH_Huks_AlgSuite}.
1317777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
1327777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or wrappingKeyAlias or
1337777dab0Sopenharmony_ci *         paramSet or wrappedKeyData is invalid.
1347777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
1357777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL} 12000004 - If failed to remove file,
1367777dab0Sopenharmony_ci *         or if failed to write file.
1377777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
1387777dab0Sopenharmony_ci *         is invalid.
1397777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
1407777dab0Sopenharmony_ci *         get key argument.
1417777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
1427777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed.
1437777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
1447777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CALL_SERVICE_FAILED} 12000015 - If connect userIam failed.
1457777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support.
1467777dab0Sopenharmony_ci * @since 9
1477777dab0Sopenharmony_ci * @version 1.0
1487777dab0Sopenharmony_ci */
1497777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_ImportWrappedKeyItem(const struct OH_Huks_Blob *keyAlias,
1507777dab0Sopenharmony_ci    const struct OH_Huks_Blob *wrappingKeyAlias, const struct OH_Huks_ParamSet *paramSet,
1517777dab0Sopenharmony_ci    const struct OH_Huks_Blob *wrappedKeyData);
1527777dab0Sopenharmony_ci
1537777dab0Sopenharmony_ci/**
1547777dab0Sopenharmony_ci * @brief Exports a public key.
1557777dab0Sopenharmony_ci *
1567777dab0Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the public key to export.
1577777dab0Sopenharmony_ci *    The alias must be the same as the alias for the key generated.
1587777dab0Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for exporting the public key.
1597777dab0Sopenharmony_ci * @param key Indicates the pointer to the public key exported.
1607777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
1617777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or
1627777dab0Sopenharmony_ci *         paramSet or key is invalid.
1637777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
1647777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit.
1657777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
1667777dab0Sopenharmony_ci *         is invalid.
1677777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
1687777dab0Sopenharmony_ci *         get key argument.
1697777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
1707777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
1717777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support.
1727777dab0Sopenharmony_ci * @since 9
1737777dab0Sopenharmony_ci * @version 1.0
1747777dab0Sopenharmony_ci */
1757777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_ExportPublicKeyItem(const struct OH_Huks_Blob *keyAlias,
1767777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSet, struct OH_Huks_Blob *key);
1777777dab0Sopenharmony_ci
1787777dab0Sopenharmony_ci/**
1797777dab0Sopenharmony_ci * @brief Deletes a key.
1807777dab0Sopenharmony_ci *
1817777dab0Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the key to delete.
1827777dab0Sopenharmony_ci *    The alias must be the same as the alias for the key generated.
1837777dab0Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for deleting the key.
1847777dab0Sopenharmony_ci *    By default, this parameter is a null pointer.
1857777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
1867777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet is invalid.
1877777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
1887777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
1897777dab0Sopenharmony_ci *         is invalid.
1907777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit.
1917777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
1927777dab0Sopenharmony_ci *         get key argument.
1937777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
1947777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
1957777dab0Sopenharmony_ci * @since 9
1967777dab0Sopenharmony_ci * @version 1.0
1977777dab0Sopenharmony_ci */
1987777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_DeleteKeyItem(const struct OH_Huks_Blob *keyAlias,
1997777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSet);
2007777dab0Sopenharmony_ci
2017777dab0Sopenharmony_ci/**
2027777dab0Sopenharmony_ci * @brief Obtains the attributes of a key.
2037777dab0Sopenharmony_ci *
2047777dab0Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the target key.
2057777dab0Sopenharmony_ci * @param paramSetIn Indicates the pointer to the attribute tag required for
2067777dab0Sopenharmony_ci *    obtaining the attributes. By default, this parameter is a null pointer.
2077777dab0Sopenharmony_ci * @param paramSetOut Indicates the pointer to the attributes obtained.
2087777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
2097777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSetIn or
2107777dab0Sopenharmony_ci *         paramSetOut is invalid.
2117777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
2127777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
2137777dab0Sopenharmony_ci *         is invalid.
2147777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit.
2157777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
2167777dab0Sopenharmony_ci *         get key argument.
2177777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
2187777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
2197777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support.
2207777dab0Sopenharmony_ci * @since 9
2217777dab0Sopenharmony_ci * @version 1.0
2227777dab0Sopenharmony_ci */
2237777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_GetKeyItemParamSet(const struct OH_Huks_Blob *keyAlias,
2247777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSetIn, struct OH_Huks_ParamSet *paramSetOut);
2257777dab0Sopenharmony_ci
2267777dab0Sopenharmony_ci/**
2277777dab0Sopenharmony_ci * @brief Checks whether a key exists.
2287777dab0Sopenharmony_ci *
2297777dab0Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the target key.
2307777dab0Sopenharmony_ci * @param paramSet Indicates the pointer to the attribute tag required for checking the key.
2317777dab0Sopenharmony_ci *    By default, this parameter is a null pointer.
2327777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
2337777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet is invalid.
2347777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
2357777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
2367777dab0Sopenharmony_ci *         is invalid.
2377777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit.
2387777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
2397777dab0Sopenharmony_ci *         get key argument.
2407777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
2417777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
2427777dab0Sopenharmony_ci * @since 9
2437777dab0Sopenharmony_ci * @version 1.0
2447777dab0Sopenharmony_ci */
2457777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_IsKeyItemExist(const struct OH_Huks_Blob *keyAlias,
2467777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSet);
2477777dab0Sopenharmony_ci
2487777dab0Sopenharmony_ci/**
2497777dab0Sopenharmony_ci * @brief Obtain the key certificate chain. This API can be called only by system applications.
2507777dab0Sopenharmony_ci *
2517777dab0Sopenharmony_ci * @permission ohos.permission.ATTEST_KEY
2527777dab0Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the target key.
2537777dab0Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for obtaining the key certificate.
2547777dab0Sopenharmony_ci * @param certChain Indicates the pointer to the key certificate chain obtained.
2557777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
2567777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or
2577777dab0Sopenharmony_ci *         certChain is invalid.
2587777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
2597777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
2607777dab0Sopenharmony_ci *         is invalid.
2617777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit.
2627777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
2637777dab0Sopenharmony_ci *         get key argument.
2647777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
2657777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed.
2667777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
2677777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support.
2687777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_PERMISSION_FAIL} 201 - If the permission check failed,
2697777dab0Sopenharmony_ci *         please apply for the required permissions first.
2707777dab0Sopenharmony_ci * @since 9
2717777dab0Sopenharmony_ci * @version 1.0
2727777dab0Sopenharmony_ci */
2737777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_AttestKeyItem(const struct OH_Huks_Blob *keyAlias,
2747777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSet, struct OH_Huks_CertChain *certChain);
2757777dab0Sopenharmony_ci
2767777dab0Sopenharmony_ci/**
2777777dab0Sopenharmony_ci * @brief Obtain the key certificate chain.
2787777dab0Sopenharmony_ci *
2797777dab0Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the target key.
2807777dab0Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for obtaining the key certificate.
2817777dab0Sopenharmony_ci * @param certChain Indicates the pointer to the key certificate chain obtained.
2827777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
2837777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or
2847777dab0Sopenharmony_ci *         paramSet or certChain is invalid.
2857777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
2867777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
2877777dab0Sopenharmony_ci *         is invalid.
2887777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit.
2897777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
2907777dab0Sopenharmony_ci *         get key argument.
2917777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
2927777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed.
2937777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
2947777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support.
2957777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_PERMISSION_FAIL} 201 - If the permission check failed,
2967777dab0Sopenharmony_ci *         please apply for the required permissions first.
2977777dab0Sopenharmony_ci * @since 11
2987777dab0Sopenharmony_ci * @version 1.0
2997777dab0Sopenharmony_ci * @note this is a networking duration interface caller need to get the certChain in asynchronous thread
3007777dab0Sopenharmony_ci */
3017777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_AnonAttestKeyItem(const struct OH_Huks_Blob *keyAlias,
3027777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSet, struct OH_Huks_CertChain *certChain);
3037777dab0Sopenharmony_ci
3047777dab0Sopenharmony_ci/**
3057777dab0Sopenharmony_ci * @brief Initializes the key session interface and obtains a handle (mandatory) and challenge value (optional).
3067777dab0Sopenharmony_ci *
3077777dab0Sopenharmony_ci * @param keyAlias Indicates the pointer to the alias of the target key.
3087777dab0Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters for the initialization operation.
3097777dab0Sopenharmony_ci * @param handle Indicates the pointer to the handle of the key session obtained.
3107777dab0Sopenharmony_ci *    This handle is required for subsequent operations, including {@link OH_Huks_UpdateSession},
3117777dab0Sopenharmony_ci * {@link OH_Huks_FinishSession}, and {@link OH_Huks_AbortSession}.
3127777dab0Sopenharmony_ci * @param challenge Indicates the pointer to the challenge value obtained.
3137777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
3147777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If keyAlias or paramSet or handle or
3157777dab0Sopenharmony_ci *         token is invalid.
3167777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
3177777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
3187777dab0Sopenharmony_ci *         is invalid.
3197777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit.
3207777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
3217777dab0Sopenharmony_ci *         get key argument.
3227777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
3237777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_SESSION_LIMIT} 12000010 - If reached max session limit.
3247777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed.
3257777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
3267777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support.
3277777dab0Sopenharmony_ci * @since 9
3287777dab0Sopenharmony_ci * @version 1.0
3297777dab0Sopenharmony_ci * @see OH_Huks_UpdateSession
3307777dab0Sopenharmony_ci * @see OH_Huks_FinishSession
3317777dab0Sopenharmony_ci * @see OH_Huks_AbortSession
3327777dab0Sopenharmony_ci */
3337777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_InitSession(const struct OH_Huks_Blob *keyAlias,
3347777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSet, struct OH_Huks_Blob *handle, struct OH_Huks_Blob *token);
3357777dab0Sopenharmony_ci
3367777dab0Sopenharmony_ci/**
3377777dab0Sopenharmony_ci * @brief Adds data by segment for the key operation, performs the related key operation,
3387777dab0Sopenharmony_ci *    and outputs the processed data.
3397777dab0Sopenharmony_ci *
3407777dab0Sopenharmony_ci * @param handle Indicates the pointer to the key session handle, which is generated by {@link OH_Huks_InitSession}.
3417777dab0Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for the key operation.
3427777dab0Sopenharmony_ci * @param inData Indicates the pointer to the data to be processed.
3437777dab0Sopenharmony_ci *    This API can be called multiples time to process large data by segment.
3447777dab0Sopenharmony_ci * @param outData Indicates the pointer to the output data.
3457777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
3467777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If handle or paramSet or inData or
3477777dab0Sopenharmony_ci *         outData is invalid.
3487777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
3497777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
3507777dab0Sopenharmony_ci *         is invalid.
3517777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit,
3527777dab0Sopenharmony_ci *         or if the handle is not exist.
3537777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
3547777dab0Sopenharmony_ci *         get key argument.
3557777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
3567777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST} 12000013 - If credemtial is not exist.
3577777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed.
3587777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_VERIFY_FAILED} 12000008 - If auth token verify failed.
3597777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_PERMANENTLY_INVALIDATED} 12000007 - If auth token info
3607777dab0Sopenharmony_ci *         verify failed.
3617777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_TIME_OUT} 12000009 - If authentication token timed out.
3627777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
3637777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET} 12000016 - If device password is required
3647777dab0Sopenharmony_ci *         but not set.
3657777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support.
3667777dab0Sopenharmony_ci * @since 9
3677777dab0Sopenharmony_ci * @version 1.0
3687777dab0Sopenharmony_ci * @see OH_Huks_InitSession
3697777dab0Sopenharmony_ci * @see OH_Huks_FinishSession
3707777dab0Sopenharmony_ci * @see OH_Huks_AbortSession
3717777dab0Sopenharmony_ci */
3727777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_UpdateSession(const struct OH_Huks_Blob *handle,
3737777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSet, const struct OH_Huks_Blob *inData, struct OH_Huks_Blob *outData);
3747777dab0Sopenharmony_ci
3757777dab0Sopenharmony_ci/**
3767777dab0Sopenharmony_ci * @brief Ends the key session.
3777777dab0Sopenharmony_ci *
3787777dab0Sopenharmony_ci * @param handle Indicates the pointer to the key session handle, which is generated by {@link OH_Huks_InitSession}.
3797777dab0Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for the key operation.
3807777dab0Sopenharmony_ci * @param inData Indicates the pointer to the data to be processed.
3817777dab0Sopenharmony_ci * @param outData Indicates the pointer to the output data.
3827777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
3837777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If handle or paramSet or inData or
3847777dab0Sopenharmony_ci *         outData is invalid.
3857777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
3867777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
3877777dab0Sopenharmony_ci *         is invalid.
3887777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - If the key file is not exit,
3897777dab0Sopenharmony_ci *         or if the handle is not exist.
3907777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
3917777dab0Sopenharmony_ci *         get key argument.
3927777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
3937777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST} 12000013 - If credemtial is not exist.
3947777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CRYPTO_FAIL} 12000006 - If crypto engine failed.
3957777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_VERIFY_FAILED} 12000008 - If auth token verify failed.
3967777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_PERMANENTLY_INVALIDATED} 12000007 - If auth token info
3977777dab0Sopenharmony_ci *         verify failed.
3987777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_KEY_AUTH_TIME_OUT} 12000009 - If authentication token timed out.
3997777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
4007777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET} 12000016 - If device password is required
4017777dab0Sopenharmony_ci *         but not set.
4027777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED} 12000001 - If the feature is not support.
4037777dab0Sopenharmony_ci * @since 9
4047777dab0Sopenharmony_ci * @version 1.0
4057777dab0Sopenharmony_ci * @see OH_Huks_InitSession
4067777dab0Sopenharmony_ci * @see OH_Huks_UpdateSession
4077777dab0Sopenharmony_ci * @see OH_Huks_AbortSession
4087777dab0Sopenharmony_ci */
4097777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_FinishSession(const struct OH_Huks_Blob *handle,
4107777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSet, const struct OH_Huks_Blob *inData, struct OH_Huks_Blob *outData);
4117777dab0Sopenharmony_ci
4127777dab0Sopenharmony_ci/**
4137777dab0Sopenharmony_ci * @brief Aborts a key session.
4147777dab0Sopenharmony_ci *
4157777dab0Sopenharmony_ci * @param handle Indicates the pointer to the key session handle, which is generated by {@link OH_Huks_InitSession}.
4167777dab0Sopenharmony_ci * @param paramSet Indicates the pointer to the parameters required for aborting the key session.
4177777dab0Sopenharmony_ci *    By default, this parameter is a null pointer.
4187777dab0Sopenharmony_ci * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
4197777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If handle or paramSet or inData or
4207777dab0Sopenharmony_ci *         outData is invalid.
4217777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
4227777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT} 12000003 - If the key argument
4237777dab0Sopenharmony_ci *         is invalid.
4247777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} 12000011 - or if the handle is not exist.
4257777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT} 12000002 - If failed to
4267777dab0Sopenharmony_ci *         get key argument.
4277777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
4287777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST} 12000013 - If credemtial is not exist.
4297777dab0Sopenharmony_ci *         {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
4307777dab0Sopenharmony_ci * @since 9
4317777dab0Sopenharmony_ci * @version 1.0
4327777dab0Sopenharmony_ci * @see OH_Huks_InitSession
4337777dab0Sopenharmony_ci * @see OH_Huks_UpdateSession
4347777dab0Sopenharmony_ci * @see OH_Huks_FinishSession
4357777dab0Sopenharmony_ci */
4367777dab0Sopenharmony_cistruct OH_Huks_Result OH_Huks_AbortSession(const struct OH_Huks_Blob *handle,
4377777dab0Sopenharmony_ci    const struct OH_Huks_ParamSet *paramSet);
4387777dab0Sopenharmony_ci
4397777dab0Sopenharmony_ci#ifdef __cplusplus
4407777dab0Sopenharmony_ci}
4417777dab0Sopenharmony_ci#endif
4427777dab0Sopenharmony_ci
4437777dab0Sopenharmony_ci/** @} */
4447777dab0Sopenharmony_ci#endif /* NATIVE_HUKS_API_H */
445