| 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 will be returned. For details about the error codes, see **HuksResult**.|
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. If the operation is successful, **HUKS_SUCCESS** will be returned. If any other result is returned, see **HuksResult**.|
| 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. For details about the error codes, see **HuksResult**.|
| 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. For details about the error codes, see **HuksResult**.|
| 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**
```js
```js
varalias='alias';
/* Set options to emptyOptions. */
varkeyAlias='keyAlias';
varemptyOptions={
varemptyOptions={
properties:[]
properties:[]
};
};
varresult=huks.deleteKey(alias,emptyOptions);
varresult=huks.deleteKey(keyAlias,emptyOptions);
```
```
## huks.getSdkVersion
## huks.getSdkVersion
...
@@ -535,6 +531,7 @@ Obtains the SDK version of the current system.
...
@@ -535,6 +531,7 @@ Obtains the SDK version of the current system.
**Example**
**Example**
```js
```js
/* Set options to emptyOptions. */
varemptyOptions={
varemptyOptions={
properties:[]
properties:[]
};
};
...
@@ -560,31 +557,41 @@ Imports a key. This method uses an asynchronous callback to return the result.
...
@@ -560,31 +557,41 @@ Imports a key. This method uses an asynchronous callback 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. For details about the error codes, see **HuksResult**.|
| 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.|
| 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. For details about the error codes, see **HuksResult**.<br/>**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**
```js
```js
/* Set options to emptyOptions. */
varkeyAlias='keyAlias';
varkeyAlias='keyAlias';
varemptyOptions={
varemptyOptions={
properties:[]
properties:[]
...
@@ -692,6 +712,7 @@ Exports a key. This method uses a promise to return the result.
...
@@ -692,6 +712,7 @@ Exports a key. This method uses a promise to return the result.
**Example**
**Example**
```js
```js
/* Set options to emptyOptions. */
varkeyAlias='keyAlias';
varkeyAlias='keyAlias';
varemptyOptions={
varemptyOptions={
properties:[]
properties:[]
...
@@ -713,11 +734,12 @@ Obtains key properties. This method uses an asynchronous callback to return the
...
@@ -713,11 +734,12 @@ Obtains key properties. This method uses an asynchronous callback to return the
| callback | AsyncCallback\<[HuksResult](#huksresult)> | Yes | Callback used to return the result. In **errorCode**, **HUKS_SUCCESS** will be returned if the operation is successful; an error code will be returned otherwise. For details about the error codes, see **HuksResult**.|
| 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**
```js
```js
/* Set options to emptyOptions. */
varkeyAlias='keyAlias';
varkeyAlias='keyAlias';
varemptyOptions={
varemptyOptions={
properties:[]
properties:[]
...
@@ -744,11 +766,12 @@ Obtains key properties. This method uses a promise to return the result.
...
@@ -744,11 +766,12 @@ Obtains key properties. This method uses a promise to return the result.
| Promise\<[HuksResult](#huksoptions)> | Promise used to return the result. In **errorCode**, **HUKS_SUCCESS** will be returned if the operation is successful; an error code will be returned otherwise. For details about the error codes, see **HuksResult**.|
| 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**
```js
```js
/* Set options to emptyOptions. */
varkeyAlias='keyAlias';
varkeyAlias='keyAlias';
varemptyOptions={
varemptyOptions={
properties:[]
properties:[]
...
@@ -775,6 +798,7 @@ Checks whether a key exists. This method uses an asynchronous callback to return
...
@@ -775,6 +798,7 @@ Checks whether a key exists. This method uses an asynchronous callback to return
**Example**
**Example**
```js
```js
/* Set options to emptyOptions. */
varkeyAlias='keyAlias';
varkeyAlias='keyAlias';
varemptyOptions={
varemptyOptions={
properties:[]
properties:[]
...
@@ -806,6 +830,7 @@ Checks whether a key exists. This method uses a promise to return the result.
...
@@ -806,6 +830,7 @@ Checks whether a key exists. This method uses a promise to return the result.
**Example**
**Example**
```js
```js
/* Set options to emptyOptions. */
varkeyAlias='keyAlias';
varkeyAlias='keyAlias';
varemptyOptions={
varemptyOptions={
properties:[]
properties:[]
...
@@ -814,6 +839,7 @@ var result = huks.isKeyExist(keyAlias, emptyOptions);
...
@@ -814,6 +839,7 @@ var result = huks.isKeyExist(keyAlias, emptyOptions);