未验证 提交 7c8b6fc7 编写于 作者: O openharmony_ci 提交者: Gitee

!15795 [翻译完成】#I6KUPY (15489+15476+15251)

Merge pull request !15795 from Annie_wang/PR15619
...@@ -4,11 +4,13 @@ The **DataShare** module allows an application to manage its own data and share ...@@ -4,11 +4,13 @@ The **DataShare** module allows an application to manage its own data and share
> **NOTE** > **NOTE**
> >
> The initial APIs of this module are supported since API version 9. 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 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> >
> The APIs provided by this module are system APIs.
> >
> The APIs of this module can be used only in the stage model. > - The APIs provided by this module are system APIs.
>
>
> - The APIs of this module can be used only in the stage model.
## Modules to Import ## Modules to Import
...@@ -49,7 +51,7 @@ Creates a **DataShareHelper** instance. This API uses an asynchronous callback t ...@@ -49,7 +51,7 @@ Creates a **DataShareHelper** instance. This API uses an asynchronous callback t
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------------------------------- | ---- | ------------------------------------------------------------ | | -------- | -------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| context | [Context](js-apis-application-context.md#context) | Yes | Context of an application. | | context | [Context](js-apis-app-ability-uiAbility.md) | Yes | Context of an application. |
| uri | string | Yes | Uniform Resource Identifier (URI) of the server application to connect. | | uri | string | Yes | Uniform Resource Identifier (URI) of the server application to connect. |
| callback | AsyncCallback<[DataShareHelper](#datasharehelper)> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined** and **data** is the **DataShareHelper** instance created. Otherwise, **err** is an error object.| | callback | AsyncCallback<[DataShareHelper](#datasharehelper)> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined** and **data** is the **DataShareHelper** instance created. Otherwise, **err** is an error object.|
...@@ -94,7 +96,7 @@ Creates a **DataShareHelper** instance. This API uses a promise to return the re ...@@ -94,7 +96,7 @@ Creates a **DataShareHelper** instance. This API uses a promise to return the re
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------- | ------------------------------------------------- | ---- | ------------------------------ | | ------- | ------------------------------------------------- | ---- | ------------------------------ |
| context | [Context](js-apis-application-context.md#context) | Yes | Context of an application. | | context | [Context](js-apis-app-ability-uiAbility.md) | Yes | Context of an application. |
| uri | string | Yes | URI of the server application to connect.| | uri | string | Yes | URI of the server application to connect.|
**Return value** **Return value**
......
...@@ -5,7 +5,7 @@ The **Preferences** module provides APIs for processing data in the form of key- ...@@ -5,7 +5,7 @@ The **Preferences** module provides APIs for processing data in the form of key-
The key is of the string type, and the value can be a number, a string, a Boolean value, or an array of numbers, strings, or Boolean values. The key is of the string type, and the value can be a number, a string, a Boolean value, or an array of numbers, strings, or Boolean values.
> **NOTE**<br/> > **NOTE**
> >
> The initial APIs of this module are supported since API version 9. 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 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -22,8 +22,8 @@ import data_preferences from '@ohos.data.preferences'; ...@@ -22,8 +22,8 @@ import data_preferences from '@ohos.data.preferences';
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
| ---------------- | -------- | ---- | ---- | --------------------------------------- | | ---------------- | -------- | ---- | ---- | --------------------------------------- |
| MAX_KEY_LENGTH | number | Yes | No | Maximum length of a key. The maximum key length is 80 bytes. | | MAX_KEY_LENGTH | number | Yes | No | Maximum length of a key, which is 80 bytes. |
| MAX_VALUE_LENGTH | number | Yes | No | Maximum length of a value. The maximum value length is 8192 bytes.| | MAX_VALUE_LENGTH | number | Yes | No | Maximum length of a value, which is 8192 bytes.|
## data_preferences.getPreferences ## data_preferences.getPreferences
...@@ -39,7 +39,7 @@ Obtains a **Preferences** instance. This API uses an asynchronous callback to re ...@@ -39,7 +39,7 @@ Obtains a **Preferences** instance. This API uses an asynchronous callback to re
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------ | ---- | ------------------------------------------------------------ | | -------- | ------------------------------------------------ | ---- | ------------------------------------------------------------ |
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md). | | context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-inner-application-uiAbilityContext.md). |
| name | string | Yes | Name of the **Preferences** instance.| | name | string | Yes | Name of the **Preferences** instance. |
| callback | AsyncCallback&lt;[Preferences](#preferences)&gt; | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined** and **object** is the **Preferences** instance obtained. Otherwise, **err** is an error code.| | callback | AsyncCallback&lt;[Preferences](#preferences)&gt; | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined** and **object** is the **Preferences** instance obtained. Otherwise, **err** is an error code.|
**Example** **Example**
...@@ -213,7 +213,6 @@ Stage model: ...@@ -213,7 +213,6 @@ Stage model:
```ts ```ts
import UIAbility from '@ohos.app.ability.UIAbility'; import UIAbility from '@ohos.app.ability.UIAbility';
class EntryAbility extends UIAbility { class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
try { try {
...@@ -289,7 +288,6 @@ Stage model: ...@@ -289,7 +288,6 @@ Stage model:
```ts ```ts
import UIAbility from '@ohos.app.ability.UIAbility'; import UIAbility from '@ohos.app.ability.UIAbility';
class EntryAbility extends UIAbility { class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
try{ try{
...@@ -350,7 +348,6 @@ Stage model: ...@@ -350,7 +348,6 @@ Stage model:
```ts ```ts
import UIAbility from '@ohos.app.ability.UIAbility'; import UIAbility from '@ohos.app.ability.UIAbility';
class EntryAbility extends UIAbility { class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
try { try {
...@@ -973,7 +970,7 @@ Unsubscribes from data changes. ...@@ -973,7 +970,7 @@ Unsubscribes from data changes.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------- | ---- | ------------------------------------------ | | -------- | -------------------------------- | ---- | ------------------------------------------ |
| type | string | Yes | Event type to unsubscribe from. The value **change** indicates data change events. | | type | string | Yes | Event type to unsubscribe from. The value **change** indicates data change events. |
| callback | Callback&lt;{ key : string }&gt; | No | Callback to unregister. If this parameter is left blank, the callbacks used to subscribing to all data changes will be unregistered.| | callback | Callback&lt;{ key : string }&gt; | No | Callback to unregister. If this parameter is left blank, the callbacks for all data changes will be unregistered.|
**Example** **Example**
......
...@@ -7,7 +7,7 @@ The **DataStorage** module provides applications with data processing capability ...@@ -7,7 +7,7 @@ The **DataStorage** module provides applications with data processing capability
> >
> - The initial APIs of this module are supported since API version 6. 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 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> >
> - The APIs of this module are no longer maintained since API version 9. You are advised to use [`@ohos.data.preferences`](js-apis-data-preferences.md). > - The APIs of this module are no longer maintained since API version 9. You are advised to use [@ohos.data.preferences](js-apis-data-preferences.md).
> >
> - The APIs of this module can be used only in the FA model. > - The APIs of this module can be used only in the FA model.
...@@ -24,8 +24,8 @@ import data_storage from '@ohos.data.storage'; ...@@ -24,8 +24,8 @@ import data_storage from '@ohos.data.storage';
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
| ---------------- | -------- | ---- | ---- | ------------------------------------- | | ---------------- | -------- | ---- | ---- | ------------------------------------- |
| MAX_KEY_LENGTH | number | Yes | No | Maximum length of a key. It must be less than 80 bytes. | | MAX_KEY_LENGTH | number | Yes | No | Maximum length of a key, which is 80 bytes. |
| MAX_VALUE_LENGTH | number | Yes | No | Maximum length of a value. It must be less than 8192 bytes.| | MAX_VALUE_LENGTH | number | Yes | No | Maximum length of a value, which is 8192 bytes.|
## data_storage.getStorageSync ## data_storage.getStorageSync
...@@ -79,7 +79,7 @@ Reads the specified file and loads its data to the **Storage** instance for data ...@@ -79,7 +79,7 @@ Reads the specified file and loads its data to the **Storage** instance for data
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------------------------- | ---- | -------------------------- | | -------- | ---------------------------------------- | ---- | -------------------------- |
| path | string | Yes | Path of the target file.| | path | string | Yes | Path of the target file.|
| callback | AsyncCallback&lt;[Storage](#storage)&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;[Storage](#storage)&gt; | Yes | Callback invoked to return the result. |
**Example** **Example**
...@@ -406,7 +406,7 @@ Obtains the value corresponding to a key. If the value is null or not of the def ...@@ -406,7 +406,7 @@ Obtains the value corresponding to a key. If the value is null or not of the def
| -------- | ------------------------------ | ---- | ----------------------------------------- | | -------- | ------------------------------ | ---- | ----------------------------------------- |
| key | string | Yes | Key of the data. It cannot be empty. | | key | string | Yes | Key of the data. It cannot be empty. |
| defValue | [ValueType](#valuetype) | Yes | Default value to be returned. It can be a number, string, or Boolean value.| | defValue | [ValueType](#valuetype) | Yes | Default value to be returned. It can be a number, string, or Boolean value.|
| callback | AsyncCallback&lt;ValueType&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;ValueType&gt; | Yes | Callback invoked to return the result. |
**Example** **Example**
...@@ -581,7 +581,7 @@ Checks whether the storage object contains data with a given key. This API uses ...@@ -581,7 +581,7 @@ Checks whether the storage object contains data with a given key. This API uses
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------------- | ---- | ------------------------------- | | -------- | ---------------------------- | ---- | ------------------------------- |
| key | string | Yes | Key of the data. It cannot be empty.| | key | string | Yes | Key of the data. It cannot be empty.|
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;boolean&gt; | Yes | Callback invoked to return the result. |
**Return value** **Return value**
...@@ -867,7 +867,7 @@ Subscribes to data changes. The **StorageObserver** needs to be implemented. Whe ...@@ -867,7 +867,7 @@ Subscribes to data changes. The **StorageObserver** needs to be implemented. Whe
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------- | ------ |---------------------------------------- | | -------- | --------------------------------------------------- | ------ |---------------------------------------- |
| type | string |Yes| Event type. The value **change** indicates data change events.| | type | string |Yes| Event type. The value **change** indicates data change events.|
| callback | Callback&lt;[StorageObserver](#storageobserver)&gt; | Yes|Callback used to return data changes. | | callback | Callback&lt;[StorageObserver](#storageobserver)&gt; | Yes|Callback invoked to return the data change. |
**Example** **Example**
...@@ -894,7 +894,7 @@ Unsubscribes from data changes. ...@@ -894,7 +894,7 @@ Unsubscribes from data changes.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------- | ------ |---------------------------------------- | | -------- | --------------------------------------------------- | ------ |---------------------------------------- |
| type | string |Yes| Event type. The value **change** indicates data change events.| | type | string |Yes| Event type. The value **change** indicates data change events.|
| callback | Callback&lt;[StorageObserver](#storageobserver)&gt; | Yes|Callback used to return data changes. | | callback | Callback&lt;[StorageObserver](#storageobserver)&gt; | Yes|Callback for the data change. |
**Example** **Example**
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
The **HUKS** module provides KeyStore (KS) capabilities for applications, including key management and key cryptography operations. The **HUKS** module provides KeyStore (KS) capabilities for applications, including key management and key cryptography operations.
The keys managed by OpenHarmony Universal KeyStore (HUKS) can be imported by applications or generated by calling the HUKS APIs. The keys managed by OpenHarmony Universal KeyStore (HUKS) can be imported by applications or generated by calling the HUKS APIs.
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br> > **NOTE**
> >
> 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.
...@@ -75,7 +75,7 @@ Generates a key. This API uses an asynchronous callback to return the result. ...@@ -75,7 +75,7 @@ Generates a key. This API uses an asynchronous callback to return the result.
| -------- | --------------------------- | ---- | --------------------------------------------- | | -------- | --------------------------- | ---- | --------------------------------------------- |
| keyAlias | string | Yes | Alias of the key. | | keyAlias | string | Yes | Alias of the key. |
| options | [HuksOptions](#huksoptions) | Yes | Tags required for generating the key. The algorithm, key purpose, and key length are mandatory.| | options | [HuksOptions](#huksoptions) | Yes | Tags required for generating the key. The algorithm, key purpose, and key length are mandatory.|
| callback | AsyncCallback\<void> | Yes | Callback that returns no value.| | callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation fails, **err** is returned.|
**Example** **Example**
...@@ -186,7 +186,7 @@ Deletes a key. This API uses an asynchronous callback to return the result. ...@@ -186,7 +186,7 @@ Deletes a key. This API uses an asynchronous callback to return the result.
| -------- | --------------------------- | ---- | --------------------------------------------- | | -------- | --------------------------- | ---- | --------------------------------------------- |
| keyAlias | string | Yes | Key alias passed in when the key was generated. | | keyAlias | string | Yes | Key alias passed in when the key was generated. |
| options | [HuksOptions](#huksoptions) | Yes | Empty object (leave this parameter empty). | | options | [HuksOptions](#huksoptions) | Yes | Empty object (leave this parameter empty). |
| callback | AsyncCallback\<void> | Yes | Callback that returns no value.| | callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation fails, **err** is returned.|
**Example** **Example**
...@@ -289,7 +289,7 @@ Imports a key in plaintext. This API uses an asynchronous callback to return the ...@@ -289,7 +289,7 @@ Imports a key in plaintext. This API uses an asynchronous callback to return the
| -------- | --------------------------- | ---- | --------------------------------------------- | | -------- | --------------------------- | ---- | --------------------------------------------- |
| keyAlias | string | Yes | Alias of the key. | | keyAlias | string | Yes | Alias of the key. |
| options | [HuksOptions](#huksoptions) | Yes | Tags required for the import and key to import. The algorithm, key purpose, and key length are mandatory.| | options | [HuksOptions](#huksoptions) | Yes | Tags required for the import and key to import. The algorithm, key purpose, and key length are mandatory.|
| callback | AsyncCallback\<void> | Yes | Callback that returns no value.| | callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation fails, **err** is returned.|
**Example** **Example**
...@@ -426,7 +426,7 @@ Obtains the certificate used to verify a key. This API uses an asynchronous call ...@@ -426,7 +426,7 @@ Obtains the certificate used to verify a key. This API uses an asynchronous call
| -------- | ---------------------------------------------------- | ---- | --------------------------------------------- | | -------- | ---------------------------------------------------- | ---- | --------------------------------------------- |
| keyAlias | string | Yes | Alias of the key. The certificate to be obtained stores the key. | | keyAlias | string | Yes | Alias of the key. The certificate to be obtained stores the key. |
| options | [HuksOptions](#huksoptions) | Yes | Parameters and data required for obtaining the certificate. | | options | [HuksOptions](#huksoptions) | Yes | Parameters and data required for obtaining the certificate. |
| callback | AsyncCallback<[HuksReturnResult](#huksreturnresult9)> | Yes | Callback invoked to return the result. If the operation is successful, no **err** value is returned; otherwise, an error code is returned.| | callback | AsyncCallback<[HuksReturnResult](#huksreturnresult9)> | Yes | Callback invoked to return the result. If the operation fails, **err** is returned.|
**Example** **Example**
...@@ -553,7 +553,7 @@ Obtains the certificate used to verify a key. This API uses a promise to return ...@@ -553,7 +553,7 @@ Obtains the certificate used to verify a key. This API uses a promise to return
| Type | Description | | Type | Description |
| ---------------------------------------------- | --------------------------------------------- | | ---------------------------------------------- | --------------------------------------------- |
| Promise<[HuksReturnResult](#huksreturnresult9)> | Promise used to return the result. If the operation is successful, no **err** value is returned; otherwise, an error code is returned.| | Promise<[HuksReturnResult](#huksreturnresult9)> | Promise used to return the result. If the operation fails, **err** is returned.|
**Example** **Example**
...@@ -676,7 +676,7 @@ Imports a wrapped key. This API uses an asynchronous callback to return the resu ...@@ -676,7 +676,7 @@ Imports a wrapped key. This API uses an asynchronous callback to return the resu
| keyAlias | string | Yes | Alias of the wrapped key to import. | | keyAlias | string | Yes | Alias of the wrapped key to import. |
| wrappingKeyAlias | string | Yes | Alias of the data used to unwrap the key imported. | | wrappingKeyAlias | string | Yes | Alias of the data used to unwrap the key imported. |
| options | [HuksOptions](#huksoptions) | Yes | Tags required for the import and the wrapped key to import. The algorithm, key purpose, and key length are mandatory.| | options | [HuksOptions](#huksoptions) | Yes | Tags required for the import and the wrapped key to import. The algorithm, key purpose, and key length are mandatory.|
| callback | AsyncCallback\<void> | Yes | Callback that returns no value.| | callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation fails, **err** is returned.|
**Example** **Example**
...@@ -1097,9 +1097,9 @@ let emptyOptions = { ...@@ -1097,9 +1097,9 @@ let emptyOptions = {
try { try {
huks.isKeyItemExist(keyAlias, emptyOptions, function (error, data) { huks.isKeyItemExist(keyAlias, emptyOptions, function (error, data) {
if (error) { if (error) {
console.info(`callback: isKeyItemExist success, data = ${JSON.stringify(data)}`);
} else {
console.error(`callback: isKeyItemExist failed, code: ${error.code}, msg: ${error.message}`); console.error(`callback: isKeyItemExist failed, code: ${error.code}, msg: ${error.message}`);
} else {
console.info(`callback: isKeyItemExist success, data = ${JSON.stringify(data)}`);
} }
}); });
} catch (error) { } catch (error) {
...@@ -1312,14 +1312,14 @@ Aborts the use of the key. This API uses an asynchronous callback to return the ...@@ -1312,14 +1312,14 @@ Aborts the use of the key. This API uses an asynchronous callback to return the
| -------- | --------------------------- | ---- | ------------------------------------------- | | -------- | --------------------------- | ---- | ------------------------------------------- |
| handle | number | Yes | Handle of the **Abort** operation. | | handle | number | Yes | Handle of the **Abort** operation. |
| options | [HuksOptions](#huksoptions) | Yes | Parameters of the **Abort** operation. | | options | [HuksOptions](#huksoptions) | Yes | Parameters of the **Abort** operation. |
| callback | AsyncCallback\<void> | Yes | Callback that returns no value.| | callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation fails, **err** is returned.|
**Example** **Example**
```js ```js
/* huks.initSession, huks.updateSession, and huks.finishSession must be used together. /* huks.initSession, huks.updateSession, and huks.finishSession must be used together.
* If an error occurs in any of huks.initSession, huks.updateSession, * If an error occurs in any of huks.initSession, huks.updateSession,
* and huks.finishSession operations, * and huks.finishSession operation,
* huks.abortSession must be called to terminate the use of the key. * huks.abortSession must be called to terminate the use of the key.
* *
* The following uses the callback of an RSA1024 key as an example. * The following uses the callback of an RSA1024 key as an example.
...@@ -1469,7 +1469,7 @@ Aborts the use of the key. This API uses a promise to return the result. ...@@ -1469,7 +1469,7 @@ Aborts the use of the key. This API uses a promise to return the result.
```js ```js
/* huks.initSession, huks.updateSession, and huks.finishSession must be used together. /* huks.initSession, huks.updateSession, and huks.finishSession must be used together.
* If an error occurs in any of huks.initSession, huks.updateSession, * If an error occurs in any of huks.initSession, huks.updateSession,
* and huks.finishSession operations, * and huks.finishSession operation,
* huks.abortSession must be called to terminate the use of the key. * huks.abortSession must be called to terminate the use of the key.
* *
* The following uses the callback of an RSA1024 key as an example. * The following uses the callback of an RSA1024 key as an example.
...@@ -1789,7 +1789,7 @@ Enumerates the tag transfer modes. ...@@ -1789,7 +1789,7 @@ Enumerates the tag transfer modes.
## HuksUnwrapSuite<sup>9+</sup> ## HuksUnwrapSuite<sup>9+</sup>
Enumerates the algorithm suites required for encrypted imports. Enumerates the algorithm suites used for importing an encrypted key.
**System capability**: SystemCapability.Security.Huks **System capability**: SystemCapability.Security.Huks
...@@ -1818,9 +1818,9 @@ Enumerates the user authentication types. ...@@ -1818,9 +1818,9 @@ Enumerates the user authentication types.
| Name | Value | Description | | Name | Value | Description |
| ------------------------------- | ---- | ------------------------- | | ------------------------------- | ---- | ------------------------- |
| HUKS_USER_AUTH_TYPE_FINGERPRINT | 1 | Fingerprint authentication. | | HUKS_USER_AUTH_TYPE_FINGERPRINT | 1 << 0 | Fingerprint authentication. |
| HUKS_USER_AUTH_TYPE_FACE | 2 | Facial authentication.| | HUKS_USER_AUTH_TYPE_FACE | 1 << 1 | Facial authentication.|
| HUKS_USER_AUTH_TYPE_PIN | 4 | PIN authentication.| | HUKS_USER_AUTH_TYPE_PIN | 1 << 2 | PIN authentication.|
## HuksAuthAccessType<sup>9+</sup> ## HuksAuthAccessType<sup>9+</sup>
...@@ -1830,8 +1830,8 @@ Enumerates the access control types. ...@@ -1830,8 +1830,8 @@ Enumerates the access control types.
| Name | Value | Description | | Name | Value | Description |
| --------------------------------------- | ---- | ------------------------------------------------ | | --------------------------------------- | ---- | ------------------------------------------------ |
| HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD | 1 | The key becomes invalid after the password is cleared. | | HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD | 1 << 0 | The key becomes invalid after the password is cleared. |
| HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL | 2 | The key becomes invalid after a new biometric feature is added.| | HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL | 1 << 1 | The key becomes invalid after a new biometric feature is added.|
## HuksChallengeType<sup>9+</sup> ## HuksChallengeType<sup>9+</sup>
...@@ -1892,7 +1892,7 @@ Enumerates the tags used to invoke parameters. ...@@ -1892,7 +1892,7 @@ Enumerates the tags used to invoke parameters.
| Name | Value | Description | | Name | Value | Description |
| -------------------------------------------- | ---------------------------------------- | -------------------------------------- | | -------------------------------------------- | ---------------------------------------- | -------------------------------------- |
| HUKS_TAG_INVALID | HuksTagType.HUKS_TAG_TYPE_INVALID \| 0 | Invalid tag. | | HUKS_TAG_INVALID | HuksTagType.HUKS_TAG_TYPE_INVALID \| 0 | Invalid tag. |
| HUKS_TAG_ALGORITHM | HUKS_TAG_TYPE_UINT \| 1 | Algorithm. | | HUKS_TAG_ALGORITHM | HuksTagType.HUKS_TAG_TYPE_UINT \| 1 | Algorithm. |
| HUKS_TAG_PURPOSE | HuksTagType.HUKS_TAG_TYPE_UINT \| 2 | Purpose of the key. | | HUKS_TAG_PURPOSE | HuksTagType.HUKS_TAG_TYPE_UINT \| 2 | Purpose of the key. |
| HUKS_TAG_KEY_SIZE | HuksTagType.HUKS_TAG_TYPE_UINT \| 3 | Key size. | | HUKS_TAG_KEY_SIZE | HuksTagType.HUKS_TAG_TYPE_UINT \| 3 | Key size. |
| HUKS_TAG_DIGEST | HuksTagType.HUKS_TAG_TYPE_UINT \| 4 | Digest algorithm. | | HUKS_TAG_DIGEST | HuksTagType.HUKS_TAG_TYPE_UINT \| 4 | Digest algorithm. |
...@@ -1922,7 +1922,7 @@ Enumerates the tags used to invoke parameters. ...@@ -1922,7 +1922,7 @@ Enumerates the tags used to invoke parameters.
| HUKS_TAG_ORIGINATION_EXPIRE_DATETIME | HuksTagType.HUKS_TAG_TYPE_ULONG \| 202 | Reserved. | | HUKS_TAG_ORIGINATION_EXPIRE_DATETIME | HuksTagType.HUKS_TAG_TYPE_ULONG \| 202 | Reserved. |
| HUKS_TAG_USAGE_EXPIRE_DATETIME | HuksTagType.HUKS_TAG_TYPE_ULONG \| 203 | Reserved. | | HUKS_TAG_USAGE_EXPIRE_DATETIME | HuksTagType.HUKS_TAG_TYPE_ULONG \| 203 | Reserved. |
| HUKS_TAG_CREATION_DATETIME | HuksTagType.HUKS_TAG_TYPE_ULONG \| 204 | Reserved. | | HUKS_TAG_CREATION_DATETIME | HuksTagType.HUKS_TAG_TYPE_ULONG \| 204 | Reserved. |
| HUKS_TAG_ALL_USERS | ksTagType.HUKS_TAG_TYPE_BOOL \| 301 | Reserved. | | HUKS_TAG_ALL_USERS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 301 | Reserved. |
| HUKS_TAG_USER_ID | HuksTagType.HUKS_TAG_TYPE_UINT \| 302 | Reserved. | | HUKS_TAG_USER_ID | HuksTagType.HUKS_TAG_TYPE_UINT \| 302 | Reserved. |
| HUKS_TAG_NO_AUTH_REQUIRED | HuksTagType.HUKS_TAG_TYPE_BOOL \| 303 | Reserved. | | HUKS_TAG_NO_AUTH_REQUIRED | HuksTagType.HUKS_TAG_TYPE_BOOL \| 303 | Reserved. |
| HUKS_TAG_USER_AUTH_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 304 | User authentication type. For details, see [HuksUserAuthType](#huksuserauthtype9). This parameter must be set together with [HuksAuthAccessType](#huksauthaccesstype9). You can set a maximum of two user authentication types at a time. For example, if **HuksAuthAccessType** is **HKS_SECURE_ACCESS_INVALID_NEW_BIO_ENROLL**, you can set two of **HKS_USER_AUTH_TYPE_FACE**, **HKS_USER_AUTH_TYPE_FINGERPRINT**, and **HKS_USER_AUTH_TYPE_FACE\**.| HKS_USER_AUTH_TYPE_FINGERPRINT | | HUKS_TAG_USER_AUTH_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 304 | User authentication type. For details, see [HuksUserAuthType](#huksuserauthtype9). This parameter must be set together with [HuksAuthAccessType](#huksauthaccesstype9). You can set a maximum of two user authentication types at a time. For example, if **HuksAuthAccessType** is **HKS_SECURE_ACCESS_INVALID_NEW_BIO_ENROLL**, you can set two of **HKS_USER_AUTH_TYPE_FACE**, **HKS_USER_AUTH_TYPE_FINGERPRINT**, and **HKS_USER_AUTH_TYPE_FACE\**.| HKS_USER_AUTH_TYPE_FINGERPRINT |
...@@ -2889,11 +2889,6 @@ Enumerates the error codes. ...@@ -2889,11 +2889,6 @@ Enumerates the error codes.
| HUKS_ERROR_NEW_ROOT_KEY_MATERIAL_EXIST | -36 |New root key material exists.| | HUKS_ERROR_NEW_ROOT_KEY_MATERIAL_EXIST | -36 |New root key material exists.|
| HUKS_ERROR_UPDATE_ROOT_KEY_MATERIAL_FAIL | -37 |Failed to update the root key material.| | HUKS_ERROR_UPDATE_ROOT_KEY_MATERIAL_FAIL | -37 |Failed to update the root key material.|
| HUKS_ERROR_VERIFICATION_FAILED | -38 |Failed to verify the certificate chain.| | HUKS_ERROR_VERIFICATION_FAILED | -38 |Failed to verify the certificate chain.|
| HUKS_ERROR_GET_USERIAM_SECINFO_FAILED<sup>9+</sup> | -40 |Failed to obtain the security attribute information of the user.|
| HUKS_ERROR_GET_USERIAM_AUTHINFO_FAILED<sup>9+</sup> | -41 |Failed to obtain the authentication information of the user.|
| HUKS_ERROR_USER_AUTH_TYPE_NOT_SUPPORT<sup>9+</sup> | -42 |The access control of the current authentication type is not supported.|
| HUKS_ERROR_KEY_AUTH_FAILED<sup>9+</sup> | -43 |The access control authentication has failed.|
| HUKS_ERROR_DEVICE_NO_CREDENTIAL<sup>9+</sup> | -44 |No credential has been enrolled for the device.|
| HUKS_ERROR_CHECK_GET_ALG_FAIL | -100 |Failed to obtain the ALG. | | HUKS_ERROR_CHECK_GET_ALG_FAIL | -100 |Failed to obtain the ALG. |
| HUKS_ERROR_CHECK_GET_KEY_SIZE_FAIL | -101 |Failed to obtain the key size.| | HUKS_ERROR_CHECK_GET_KEY_SIZE_FAIL | -101 |Failed to obtain the key size.|
| HUKS_ERROR_CHECK_GET_PADDING_FAIL | -102 |Failed to obtain the padding algorithm.| | HUKS_ERROR_CHECK_GET_PADDING_FAIL | -102 |Failed to obtain the padding algorithm.|
...@@ -2920,7 +2915,5 @@ Enumerates the error codes. ...@@ -2920,7 +2915,5 @@ Enumerates the error codes.
| HUKS_ERROR_INVALID_SALT | -123 |Invalid salt value.| | HUKS_ERROR_INVALID_SALT | -123 |Invalid salt value.|
| HUKS_ERROR_INVALID_ITERATION | -124 |Invalid iteration count.| | HUKS_ERROR_INVALID_ITERATION | -124 |Invalid iteration count.|
| HUKS_ERROR_INVALID_OPERATION | -125 |Invalid operation.| | HUKS_ERROR_INVALID_OPERATION | -125 |Invalid operation.|
| HUKS_ERROR_INVALID_WRAPPED_FORMAT<sup>9+</sup> | -126 |Incorrect format of the wrapped key being imported.|
| HUKS_ERROR_INVALID_USAGE_OF_KEY<sup>9+</sup> | -127 |Incorrect purpose of the wrapped key being imported.|
| HUKS_ERROR_INTERNAL_ERROR | -999 |Internal error.| | HUKS_ERROR_INTERNAL_ERROR | -999 |Internal error.|
| HUKS_ERROR_UNKNOWN_ERROR | -1000 |Unknown error.| | HUKS_ERROR_UNKNOWN_ERROR | -1000 |Unknown error.|
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册