提交 b94fa2a1 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 d9349db7
......@@ -187,13 +187,13 @@
- [@ohos.resourceschedule.usageStatistics](js-apis-resourceschedule-deviceUsageStatistics.md)
- [@ohos.WorkSchedulerExtensionAbility](js-apis-WorkSchedulerExtensionAbility.md)
- Security
- [@ohos.abilityAccessCtrl](js-apis-abilityAccessCtrl.md)
- [@ohos.privacyManager](js-apis-privacyManager.md)
- [@ohos.security.cryptoFramework](js-apis-cryptoFramework.md)
- [@ohos.security.huks ](js-apis-huks.md)
- [@ohos.userIAM.faceAuth](js-apis-useriam-faceauth.md)
- [@ohos.userIAM.userAuth ](js-apis-useriam-userauth.md)
- [@system.cipher](js-apis-system-cipher.md)
- [@ohos.abilityAccessCtrl (Ability Access Control)](js-apis-abilityAccessCtrl.md)
- [@ohos.privacyManager (Privacy Management)](js-apis-privacyManager.md)
- [@ohos.security.cryptoFramework (Crypto Framework)](js-apis-cryptoFramework.md)
- [@ohos.security.huks (HUKS)](js-apis-huks.md)
- [@ohos.userIAM.faceAuth (Facial Authentication)](js-apis-useriam-faceauth.md)
- [@ohos.userIAM.userAuth (User Authentication)](js-apis-useriam-userauth.md)
- [@system.cipher (Cipher Algorithm)](js-apis-system-cipher.md)
- Data Management
- [@ohos.data.dataAbility ](js-apis-data-ability.md)
- [@ohos.data.dataShare](js-apis-data-dataShare.md)
......@@ -294,6 +294,7 @@
- [@ohos.sensor](js-apis-sensor.md)
- [@ohos.settings](js-apis-settings.md)
- [@ohos.stationary](js-apis-stationary.md)
- [@ohos.systemCapability (SystemCapability)](js-apis-system-capability.md)
- [@ohos.systemParameterV9](js-apis-system-parameterV9.md)
- [@ohos.thermal](js-apis-thermal.md)
- [@ohos.update](js-apis-update.md)
......
# Ability Access Control
# @ohos.abilityAccessCtrl (Ability Access Control)
The **AbilityAccessCtrl** module provides APIs for application permission management, including authentication, authorization, and revocation.
......
# Privacy Management
# @ohos.privacyManager (Privacy Management)
The **privacyManager** module provides APIs for privacy management, such as management of permission usage records.
......
# @ohos.systemCapability (SystemCapability)
System capability (SysCap) refers to a relatively independent feature in the operating system. Different devices provide different system capabilities, and multiple APIs implement a system capability. You can determine whether an API can be used based on system capabilities. This module provides APIs for querying the set of system capabilities.
> **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 APIs provided by this module are system APIs.
## Modules to Import
```ts
import systemcapability from '@ohos.systemCapability'
```
## systemcapability.querySystemCapabilities
querySystemCapabilities(callback: AsyncCallback<string>): void;
Queries system capabilities. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Developtools.Syscap
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<string> | Yes| Callback invoked to return the result.|
**Example**
```ts
try {
systemcapability.querySystemCapabilities(function (err, data) {
if (err == undefined) {
console.log("get system capabilities:" + data)
} else {
console.log(" get system capabilities err:" + err.code)
}});
}catch(e){
console.log("get unexpected error: " + e);
}
```
## systemcapability.querySystemCapabilities
querySystemCapabilities(): Promise&lt;string&gt;
Queries system capabilities. This API uses a promise to return the result.
**System capability**: SystemCapability.Startup.SystemInfo
**Return value**
| Type| Description|
| -------- | -------- |
| Promise&lt;string&gt; | Promise used to return the result.|
**Example**
```ts
try {
var p = systemcapability.querySystemCapabilities();
p.then(function (value) {
console.log("get system capabilities: " + value);
}).catch(function (err) {
console.log("get system capabilities error: " + err.code);
});
}catch(e){
console.log("get unexpected error: " + e);
}
```
> **NOTE**
> - The system capabilities returned by the preceding APIs are in the form of an encoded numeric string.
# Encryption Algorithm
# @system.cipher (Cipher Algorithm)
> **NOTE**<br>
> **NOTE**
>
> The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -31,7 +31,7 @@ Defines the input parameters of **cipher.rsa()**.
| Name | Type | Mandatory| Description |
| -------------- | ------------------------------------ | ---- | ------------------------------------------------------------ |
| action | string | Yes | Action to perform. The options are as follows:<br>1. **encrypt**: Encrypts data.<br>2. **decrypt**: Decrypts data.|
| text | string | Yes | Text to be encrypted or decrypted.<br> The text to be encrypted must be a common text and cannot exceed the length calculated based on the formula (keySize/8 - 66). **keySize** indicates the key length. For example, if the key length is 1024 bytes, the text cannot exceed 62 bytes (1024/8 - 66 = 62). The text to be decrypted must be a binary value encoded in Base64. The default format is used for Base64 encoding.|
| text | string | Yes | Text to be encrypted or decrypted.<br> The text to be encrypted must be a common text and cannot exceed the length calculated based on the formula (keySize/8 - 66). **keySize** indicates the key length. <br>For example, if the key length is 1024 bytes, the text cannot exceed 62 bytes (1024/8 - 66 = 62). The text to be decrypted must be a binary value encoded in Base64. The default format is used for Base64 encoding. |
| key | string | Yes | RSA key. It is a public key in encryption and a private key in decryption. |
| transformation | string | No | RSA padding. The default value is **RSA/None/OAEPWithSHA256AndMGF1Padding**.|
| success | (data: [CipherResponse](#cipherresponse)) => void | No | Called when data is encrypted or decrypted successfully. |
......
# Facial Authentication
# @ohos.userIAM.faceAuth (Facial Authentication)
The **userIAM.faceAuth** module provides APIs for face enrollment.
......
# User Authentication
# @ohos.userIAM.userAuth (User Authentication)
The **userIAM.userAuth** module provides user authentication capabilities in identity authentication scenarios, such as device unlocking, payment, and app login.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册