diff --git a/en/application-dev/reference/apis/js-apis-data-rdb.md b/en/application-dev/reference/apis/js-apis-data-rdb.md index 50d8dbd904620d5002c285d034651bf65f62a745..f8aa9aa6ee35656ef11f47a17889fded61aaede5 100644 --- a/en/application-dev/reference/apis/js-apis-data-rdb.md +++ b/en/application-dev/reference/apis/js-apis-data-rdb.md @@ -66,7 +66,7 @@ Obtains a relational database \(RDB\) store. You can set parameters for the RDB ``` import dataRdb from '@ohos.data.rdb' - const STORE_CONFIG = { name: "RdbTest.db", encryptKey: new Uint8Array([1, 2])} + const STORE_CONFIG = { name: "RdbTest.db"} const SQL_CREATE_TABLE = "CREATE TABLE IF NOT EXISTS EMPLOYEE (ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT NOT NULL, AGE INTEGER, SALARY REAL, CODES BLOB)" dataRdb.getRdbStore(STORE_CONFIG, 1, function (err, rdbStore) { rdbStore.executeSql(SQL_CREATE_TABLE) @@ -2557,114 +2557,6 @@ Runs the SQL statement that contains the specified parameters but does not retur ``` -### changeEncryptKey8+ - -changeEncryptKey\(newEncryptKey:Uint8Array, callback: AsyncCallback\):void - -Changes the encryption key of the RDB store. This method uses a callback to return the result. - -- Parameters - - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

newEncryptKey

-

Uint8Array

-

Yes

-

New encryption key. This parameter cannot be empty.

-

callback

-

AsyncCallback<number>

-

Yes

-

Callback invoked to return the result.

-
- - -- Example - - ``` - var newKey = new Uint8Array([1, 2]) - rdbStore.changeEncryptKey(newKey, function (ret) { - console.info(TAG + "result is " + ret)}) - ``` - - -### changeEncryptKey8+ - -changeEncryptKey\(newEncryptKey:Uint8Array\): Promise - -Changes the encryption key of the RDB store. This method uses a promise to return the result. - -- Parameters - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

newEncryptKey

-

Uint8Array

-

Yes

-

New encryption key. This parameter cannot be empty.

-
- -- Return values - - - - - - - - - - -

Type

-

Description

-

Promise<number>

-

Promise used to return the result.

-
- -- Example - - ``` - var newKey = new Uint8Array([1, 2]) - let promise = rdbStore.changeEncryptKey(newKey) - promise.then((ret) => { - console.info(TAG + "result is " + ret)}) - ``` - - ## StoreConfig Manages the configuration of an RDB store. @@ -2689,14 +2581,6 @@ Manages the configuration of an RDB store.

Database file name.

-

encryptKey (BETA)8+

- -

Uint8Array

- -

No

- -

Key used to encrypt the RDB store. If a key is added during the creation of an RDB store, the key is required each time you open the RDB store.

-