@@ -184,6 +195,11 @@ Verifies the certificate signature. This API uses an asynchronous callback to re
...
@@ -184,6 +195,11 @@ Verifies the certificate signature. This API uses an asynchronous callback to re
| key | cryptoFramework.PubKey | Yes | Public key used for signature verification. |
| key | cryptoFramework.PubKey | Yes | Public key used for signature verification. |
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If **error** is **null**, the signature verification is successful. If **error** is not **null**, the signature verification fails.|
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If **error** is **null**, the signature verification is successful. If **error** is not **null**, the signature verification fails.|
**Error codes**
| ID| Error Message |
| -------- | ------------------ |
| 19030001 | Crypto operation error. |
**Example**
**Example**
...
@@ -235,6 +251,12 @@ Verifies the certificate signature. This API uses a promise to return the result
...
@@ -235,6 +251,12 @@ Verifies the certificate signature. This API uses a promise to return the result
| -------------- | ----------- |
| -------------- | ----------- |
| Promise\<void> | Promise used to return the result.|
| Promise\<void> | Promise used to return the result.|
**Error codes**
| ID| Error Message |
| -------- | ------------------ |
| 19030001 | Crypto operation error. |
**Example**
**Example**
```js
```js
...
@@ -275,6 +297,13 @@ Obtains the serialized X.509 certificate data. This API uses an asynchronous cal
...
@@ -275,6 +297,13 @@ Obtains the serialized X.509 certificate data. This API uses an asynchronous cal
| callback | AsyncCallback\<[EncodingBlob](#encodingblob)> | Yes | Callback invoked to return the result. Promise used to return the serialized X.509 certificate data obtained.|
| callback | AsyncCallback\<[EncodingBlob](#encodingblob)> | Yes | Callback invoked to return the result. Promise used to return the serialized X.509 certificate data obtained.|
| string | Start time of the X509 certificate validity period, in the YYMMDDHHMMSSZ or YYYYMMDDHHMMSSZ format. The value must end with **Z**, which indicates the UTC.|
| string | Start time of the X509 certificate validity period, in the YYMMDDHHMMSSZ or YYYYMMDDHHMMSSZ format. The value must end with **Z**, which indicates the UTC.|
| string | Expiration time of the X509 certificate validity period, in the YYMMDDHHMMSSZ or YYYYMMDDHHMMSSZ format. The value must end with **Z**, which indicates the UTC.|
| string | Expiration time of the X509 certificate validity period, in the YYMMDDHHMMSSZ or YYYYMMDDHHMMSSZ format. The value must end with **Z**, which indicates the UTC.|
| Promise\<EncodingBlob> | Promise used to return the serialized X.509 CRL data obtained.|
| Promise\<EncodingBlob> | Promise used to return the serialized X.509 CRL data obtained.|
**Error codes**
| ID| Error Message |
| -------- | ----------------------- |
| 19020001 | Memory error. |
| 19020002 | Runtime error. |
| 19030001 | Crypto operation error. |
**Example**
**Example**
```js
```js
...
@@ -1227,6 +1401,11 @@ Verifies the signature of the X.509 CRL. This API uses an asynchronous callback
...
@@ -1227,6 +1401,11 @@ Verifies the signature of the X.509 CRL. This API uses an asynchronous callback
| key | cryptoFramework.PubKey | Yes | Public key used for signature verification. |
| key | cryptoFramework.PubKey | Yes | Public key used for signature verification. |
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If **error** is **null**, the signature verification is successful. If **error** is not **null**, the signature verification fails.|
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If **error** is **null**, the signature verification is successful. If **error** is not **null**, the signature verification fails.|
**Error codes**
| ID| Error Message |
| -------- | ----------------------- |
| 19030001 | Crypto operation error. |
**Example**
**Example**
...
@@ -1279,6 +1458,12 @@ Verifies the signature of the X.509 CRL. This API uses a promise to return the r
...
@@ -1279,6 +1458,12 @@ Verifies the signature of the X.509 CRL. This API uses a promise to return the r
| callback | AsyncCallback<Array\<X509CrlEntry>> | Yes | Callback invoked to return the result. Promise used to return a list of revoked X.509 certificates.|
| callback | AsyncCallback<Array\<X509CrlEntry>> | Yes | Callback invoked to return the result. Promise used to return a list of revoked X.509 certificates.|
**Error codes**
| ID| Error Message |
| -------- | ----------------------- |
| 19020001 | Memory error. |
| 19030001 | Crypto operation error. |
**Example**
**Example**
...
@@ -1603,6 +1832,13 @@ Obtains all the revoked X.509 certificates. This API uses a promise to return th
...
@@ -1603,6 +1832,13 @@ Obtains all the revoked X.509 certificates. This API uses a promise to return th
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If **error** is **null**, the X.509 certificate chain is valid. If **error** is not **null**, the X.509 certificate chain is not valid.|
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If **error** is **null**, the X.509 certificate chain is valid. If **error** is not **null**, the X.509 certificate chain is not valid.|
| callback | AsyncCallback\<[EncodingBlob](#encodingblob)> | Yes | Callback invoked to return the result. Promise used to return the serialized data of the revoked certificate obtained.|
| callback | AsyncCallback\<[EncodingBlob](#encodingblob)> | Yes | Callback invoked to return the result. Promise used to return the serialized data of the revoked certificate obtained.|
**Error codes**
| ID| Error Message |
| -------- | ----------------------- |
| 19020001 | Memory error. |
| 19020002 | Runtime error. |
| 19030001 | Crypto operation error. |
**Example**
**Example**
...
@@ -2011,6 +2329,14 @@ Obtains the serialized data of this revoked certificate. This API uses a promise
...
@@ -2011,6 +2329,14 @@ Obtains the serialized data of this revoked certificate. This API uses a promise
| algName | string | Yes | Digest algorithm. For details about the supported algorithms, see [HMAC Algorithm Specifications](../../security/cryptoFramework-overview.md#hmac-algorithm-specifications).|
| algName | string | Yes | Digest algorithm. For details about the supported algorithms, see [HMAC Algorithm Specifications](../../security/cryptoFramework-overview.md#hmac-algorithm-specifications).|
**Return value**
**Return value**
...
@@ -483,7 +483,7 @@ For details about the supported specifications, see [MD Algorithm Specifications
...
@@ -483,7 +483,7 @@ For details about the supported specifications, see [MD Algorithm Specifications
| algName | string | Yes | Digest algorithm. For details about the supported algorithms, see [MD Algorithm Specifications](../../security/cryptoFramework-overview.md#md-algorithm-specifications).|
| algName | string | Yes | Digest algorithm. For details about the supported algorithms, see [MD Algorithm Specifications](../../security/cryptoFramework-overview.md#md-algorithm-specifications).|
**Return value**
**Return value**
...
@@ -1852,7 +1852,7 @@ Updates the data to encrypt or decrypt by segment. This API uses a promise to re
...
@@ -1852,7 +1852,7 @@ Updates the data to encrypt or decrypt by segment. This API uses a promise to re
Updates the data to be signed. This API uses an asynchronous callback to return the result.
Updates the data to be signed. This API uses an asynchronous callback to return the result.
> **NOTE**<br>
> **NOTE**<br>
> For details about the sample code for calling **update()** multiple times, see [Signing Data and Verifying Signatures](../../security/cryptoFramework-guidelines.md#signing-data-and-verifying-signatures).
> For details about the sample code for calling **update()** multiple times, see [Generating and Verifying a Signature](../../security/cryptoFramework-guidelines.md#generating-and-verifying-a-signature).
Updates the data to be signed. This API uses a promise to return the result.
Updates the data to be signed. This API uses a promise to return the result.
> **NOTE**<br>
> **NOTE**<br>
> For details about the sample code for calling **update()** multiple times, see [Signing Data and Verifying Signatures](../../security/cryptoFramework-guidelines.md#signing-data-and-verifying-signatures).
> For details about the sample code for calling **update()** multiple times, see [Generating and Verifying a Signature](../../security/cryptoFramework-guidelines.md#generating-and-verifying-a-signature).
Updates the data for signature verification. This API uses an asynchronous callback to return the result.
Updates the data for signature verification. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
> For details about the sample code for calling **update()** multiple times, see [Signing Data and Verifying Signatures](../../security/cryptoFramework-guidelines.md#signing-data-and-verifying-signatures).
> For details about the sample code for calling **update()** multiple times, see [Generating and Verifying a Signature](../../security/cryptoFramework-guidelines.md#generating-and-verifying-a-signature).
Updates the data for signature verification. This API uses a promise to return the result.
Updates the data for signature verification. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
> For details about the sample code for calling **update()** multiple times, see [Signing Data and Verifying Signatures](../../security/cryptoFramework-guidelines.md#signing-data-and-verifying-signatures).
> For details about the sample code for calling **update()** multiple times, see [Generating and Verifying a Signature](../../security/cryptoFramework-guidelines.md#generating-and-verifying-a-signature).
| 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 the application context of the stage model, see [Context](js-apis-ability-context.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).|
| bundleName | string | Yes | Bundle name. |
| bundleName | string | Yes | Bundle name. |
## Constants
## Constants
...
@@ -258,7 +258,7 @@ Creates a **KVManager** instance to manage KV stores.
...
@@ -258,7 +258,7 @@ Creates a **KVManager** instance to manage KV stores.
| config | [KVManagerConfig](#kvmanagerconfig) | Yes | **KVManager** instance configuration, including the bundle name and user information of the caller.|
| config | [KVManagerConfig](#kvmanagerconfig) | Yes | **KVManager** instance configuration, including the bundle name of the caller and user information.|
**Return value**
**Return value**
...
@@ -271,8 +271,7 @@ Creates a **KVManager** instance to manage KV stores.
...
@@ -271,8 +271,7 @@ Creates a **KVManager** instance to manage KV stores.
> - The APIs of this module are no longer maintained since API version 7. You are advised to use [`@ohos.bluetooth`](js-apis-bluetooth.md).
> - The APIs of this module are no longer maintained since API version 7. You are advised to use [`@ohos.bluetooth`](js-apis-bluetooth.md).
>
>
...
@@ -19,11 +19,10 @@ import bluetooth from '@system.bluetooth';
...
@@ -19,11 +19,10 @@ import bluetooth from '@system.bluetooth';
Scans for Bluetooth Low Energy (BLE) devices nearby. This operation consumes system resources. Call [bluetooth.stopBLEScan](#bluetoothstopblescanobject) to stop the scan after a BLE device is detected and connected.
Scans for Bluetooth Low Energy (BLE) devices nearby. This operation consumes system resources. Call [bluetooth.stopBLEScan](#bluetoothstopblescanobject) to stop the scan after a BLE device is detected and connected.
**Required permissions**: ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.LOCATION
> 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.
> - 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.
>- The APIs provided by this module are deprecated since API version 9. You are advised to use [cryptoFramework-Cipher](js-apis-cryptoFramework.md#Cipher).
## Modules to Import
## Modules to Import
...
@@ -18,9 +18,10 @@ Defines the response to the cipher interface called.
...
@@ -18,9 +18,10 @@ Defines the response to the cipher interface called.