> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Openharmony Universal KeyStore (HUKS) provides KeyStore (KS) capabilities for applications, including key management and key cryptography operations.
Openharmony Universal KeyStore (HUKS) provides KeyStore (KS) capabilities for applications, including key management and key cryptography operations.
| options | [HuksOptions](#huksoptions) | Yes | Tags required for generating the key. |
| options | [HuksOptions](#huksoptions) | Yes | Tags required for generating the key. |
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code defined in **HuksResult** will be returned.|
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code defined in **HuksResult** will be returned.|
**Example**
**Example**
...
@@ -411,13 +410,13 @@ Generates a key. This API uses a promise to return the result.
...
@@ -411,13 +410,13 @@ Generates a key. This API uses a promise to return the result.
| Promise\<[HuksResult](#huksresult)> | Promise used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned.|
| Promise\<[HuksResult](#huksresult)> | Promise used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned.|
**Example**
**Example**
...
@@ -463,7 +462,7 @@ Deletes a key. This API uses an asynchronous callback to return the result.
...
@@ -463,7 +462,7 @@ Deletes a key. This API uses an asynchronous callback to return the result.
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned.|
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned.|
**Example**
**Example**
...
@@ -488,14 +487,14 @@ Deletes a key. This API uses a promise to return the result.
...
@@ -488,14 +487,14 @@ Deletes a key. This API uses a promise to return the result.
| Promise\<[HuksResult](#huksresult)> | Promise used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned.|
| Promise\<[HuksResult](#huksresult)> | Promise used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned.|
**Example**
**Example**
...
@@ -520,13 +519,13 @@ Obtains the SDK version of the current system.
...
@@ -520,13 +519,13 @@ Obtains the SDK version of the current system.
| keyAlias | string | Yes | Key alias, which is used to hold the key pair.|
| keyAlias | string | Yes | Key alias, which is used to hold the key pair.|
| options | [HuksOptions](#huksoptions) | Yes | Tags required for the import and key pair to import.|
| options | [HuksOptions](#huksoptions) | Yes | Tags required for the import and key pair to import.|
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned.|
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned.|
**Example**
**Example**
...
@@ -608,14 +607,14 @@ Imports a key. This API uses a promise to return the result.
...
@@ -608,14 +607,14 @@ Imports a key. This API uses a promise to return the result.
| Promise\<[HuksResult](#huksresult)> | Promise used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned.|
| Promise\<[HuksResult](#huksresult)> | Promise used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned.|
**Example**
**Example**
...
@@ -675,7 +674,7 @@ Exports a key. This API uses an asynchronous callback to return the result.
...
@@ -675,7 +674,7 @@ Exports a key. This API uses an asynchronous callback to return the result.
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned. **outData** contains the public key exported.|
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned. **outData** contains the public key exported.|
**Example**
**Example**
...
@@ -700,14 +699,14 @@ Exports a key. This API uses a promise to return the result.
...
@@ -700,14 +699,14 @@ Exports a key. This API uses a promise to return the result.
| Promise\<[HuksResult](#huksresult)> | Promise used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned. **outData** contains the public key exported.|
| Promise\<[HuksResult](#huksresult)> | Promise used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If the operation fails, an error code will be returned. **outData** contains the public key exported.|
**Example**
**Example**
...
@@ -734,7 +733,7 @@ Obtains key properties. This API uses an asynchronous callback to return the res
...
@@ -734,7 +733,7 @@ Obtains key properties. This API uses an asynchronous callback to return the res
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. **HUKS_SUCCESS** will be returned if the operation is successful; an error code will be returned otherwise.|
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. **HUKS_SUCCESS** will be returned if the operation is successful; an error code will be returned otherwise.|
**Example**
**Example**
...
@@ -759,14 +758,14 @@ Obtains key properties. This API uses a promise to return the result.
...
@@ -759,14 +758,14 @@ Obtains key properties. This API uses a promise to return the result.
| Promise\<[HuksResult](#huksoptions)> | Promise used to return the result. In the return result, **HUKS_SUCCESS** will be returned for **errorCode** if the operation is successful; an error code will be returned otherwise. **properties** returns the parameters required for generating the key.|
| Promise\<[HuksResult](#huksoptions)> | Promise used to return the result. In the return result, **HUKS_SUCCESS** will be returned for **errorCode** if the operation is successful; an error code will be returned otherwise. **properties** returns the parameters required for generating the key.|
**Example**
**Example**
...
@@ -791,9 +790,9 @@ Checks whether a key exists. This API uses an asynchronous callback to return th
...
@@ -791,9 +790,9 @@ Checks whether a key exists. This API uses an asynchronous callback to return th