diff --git a/AppDataSecurity/AppScope/app.json5 b/AppDataSecurity/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..23545b4b48c51e6536927a843b30fd82ccac07ad --- /dev/null +++ b/AppDataSecurity/AppScope/app.json5 @@ -0,0 +1,10 @@ +{ + "app": { + "bundleName": "com.huawei.AppDataSecurity", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name" + } +} diff --git a/AppDataSecurity/AppScope/resources/base/element/string.json b/AppDataSecurity/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..1a6dd9427e5879a9e7b03b93dd3f431da22371b4 --- /dev/null +++ b/AppDataSecurity/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "AppDataSecurity" + } + ] +} diff --git a/AppDataSecurity/AppScope/resources/base/media/app_icon.png b/AppDataSecurity/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a39445dc87828b76fed6d2ec470dd455c45319e3 Binary files /dev/null and b/AppDataSecurity/AppScope/resources/base/media/app_icon.png differ diff --git a/AppDataSecurity/README.md b/AppDataSecurity/README.md new file mode 100644 index 0000000000000000000000000000000000000000..08b246b6a4c69cd627abdcec9ee9092e8735af2b --- /dev/null +++ b/AppDataSecurity/README.md @@ -0,0 +1,34 @@ +# 应用数据安全 + +### 简介 +本示例实现了获取文件路径以及通用密钥库加解密算法。 + +### 工程目录 +``` +├──entry/src/main/ets/ +│ ├──entryability +│ │ └──EntryAbility.ets // 程序入口类 +│ ├──entrybackupability +│ │ └──EntryBackupAbility.ets // 程序入口类 +│ └──pages +│ └──Index.ets // 首页 +└──entry/src/main/resources // 应用静态资源目录 +``` + +### 相关权限 + +不涉及 + +### 依赖 + +不涉及。 + +### 约束与限制 + +1. 本示例仅支持标准系统上运行,支持设备:华为手机。 + +2. HarmonyOS系统:HarmonyOS NEXT Release及以上。 + +3. DevEco Studio版本:DevEco Studio NEXT Release及以上。 + +4. HarmonyOS SDK版本:HarmonyOS NEXT Release SDK及以上。 \ No newline at end of file diff --git a/AppDataSecurity/build-profile.json5 b/AppDataSecurity/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..1e69556b3411622cb2e87a87389653bb34f1b148 --- /dev/null +++ b/AppDataSecurity/build-profile.json5 @@ -0,0 +1,41 @@ +{ + "app": { + "signingConfigs": [], + "products": [ + { + "name": "default", + "signingConfig": "default", + "compatibleSdkVersion": "5.0.0(12)", + "runtimeOS": "HarmonyOS", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/AppDataSecurity/entry/build-profile.json5 b/AppDataSecurity/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..4d611879c7913fb0610c686e2399258ab3a6dad1 --- /dev/null +++ b/AppDataSecurity/entry/build-profile.json5 @@ -0,0 +1,28 @@ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/AppDataSecurity/entry/hvigorfile.ts b/AppDataSecurity/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..c6edcd90486dd5a853cf7d34c8647f08414ca7a3 --- /dev/null +++ b/AppDataSecurity/entry/hvigorfile.ts @@ -0,0 +1,6 @@ +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} diff --git a/AppDataSecurity/entry/oh-package.json5 b/AppDataSecurity/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..248c3b7541a589682a250f86a6d3ecf7414d2d6a --- /dev/null +++ b/AppDataSecurity/entry/oh-package.json5 @@ -0,0 +1,10 @@ +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/AppDataSecurity/entry/src/main/ets/entryability/EntryAbility.ets b/AppDataSecurity/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..8335b7692d4cac1f8b5d78ce7bc1c45a453d563e --- /dev/null +++ b/AppDataSecurity/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,41 @@ +import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/AppDataSecurity/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/AppDataSecurity/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..dc55c03d3eea7ce53d5346c732a39ce9bf5267e1 --- /dev/null +++ b/AppDataSecurity/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -0,0 +1,12 @@ +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; + +export default class EntryBackupAbility extends BackupExtensionAbility { + async onBackup() { + hilog.info(0x0000, 'testTag', 'onBackup ok'); + } + + async onRestore(bundleVersion: BundleVersion) { + hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); + } +} \ No newline at end of file diff --git a/AppDataSecurity/entry/src/main/ets/pages/Index.ets b/AppDataSecurity/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..471941c851e8ad0b2493060fd076ac5a8b20dad1 --- /dev/null +++ b/AppDataSecurity/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,262 @@ +/* +* Copyright (c) 2024 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +import { common, contextConstant } from '@kit.AbilityKit'; +import { fileIo } from '@kit.CoreFileKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { buffer } from '@kit.ArkTS'; +import { huks } from '@kit.UniversalKeystoreKit'; + +@Entry +@Component +struct Index { + @State message: string = ''; + + build() { + Column() { + Column({ space: 12 }) { + Text($r('app.string.file_path')) + .fontSize(20) + .fontWeight(700) + Text(this.message) + .fontSize(16) + } + .width('100%') + .alignItems(HorizontalAlign.Start) + Column({ space: 12 }) { + Button($r('app.string.get_file_path')) + .width('100%') + .onClick(() => { + this.getEl2Path(); + }) + Button($r('app.string.get_el1_file_path')) + .width('100%') + .onClick(() => { + this.getEl1Path(); + }) + Button($r('app.string.encrypted')) + .width('100%') + .onClick(async () => { + await GenerateAesKey(); + await EncryptData(); + }) + Button($r('app.string.decrypted')) + .width('100%') + .onClick(() => { + DecryptData(); + }) + } + } + .width('100%') + .height('100%') + .justifyContent(FlexAlign.SpaceBetween) + .padding(16) + } + + getEl2Path() { + let context = getContext(this) as common.UIAbilityContext; + context.area = contextConstant.AreaMode.EL2; + let file_path = context.filesDir + '/health_data.txt'; + this.message = file_path; + } + + getEl1Path() { + let context = getContext(this) as common.UIAbilityContext; + context.area = contextConstant.AreaMode.EL1; + let file_path = context.filesDir + '/health_data.txt'; + this.message = file_path; + } +} + +let aesKeyAlias = 'test_aesKeyAlias'; +let handle: number; +let plainText = '123456'; +let IV = '001122334455'; +let cipherData: Uint8Array; + +function writeFile(file_path: string, data: string) { + let file = fileIo.openSync(file_path, fileIo.OpenMode.READ_WRITE | fileIo.OpenMode.CREATE); + let writeLen = fileIo.writeSync(file.fd, data); + hilog.info(0x0000, 'AppDataSecurity', 'The length of str is: ' + writeLen); + fileIo.closeSync(file); +} + +function readFile(file_path: string): object { + let file = fileIo.openSync(file_path, fileIo.OpenMode.READ_WRITE | fileIo.OpenMode.CREATE); + let arrayBuffer = new ArrayBuffer(1024); + + class Option { + public offset: number = 0; + public length: number = 0; + } + + let option = new Option(); + option.length = arrayBuffer.byteLength; + let readLen = fileIo.readSync(file.fd, arrayBuffer, option); + let buf = buffer.from(arrayBuffer, 0, readLen); + hilog.info(0x0000, 'AppDataSecurity', `The length of of file: ${readLen}`); + fileIo.closeSync(file); + return [readLen, buf.toString()] +} + +function StringToUint8Array(str: String) { + let arr: number[] = new Array(); + for (let i = 0, j = str.length; i < j; ++i) { + arr.push(str.charCodeAt(i)); + } + return new Uint8Array(arr); +} + +function Uint8ArrayToString(fileData: Uint8Array) { + let dataString = ''; + for (let i = 0; i < fileData.length; i++) { + dataString += String.fromCharCode(fileData[i]); + } + return dataString; +} + +function GetAesGenerateProperties() { + let properties: Array = [{ + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_AES + }, { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_AES_KEY_SIZE_128 + }, { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_ENCRYPT | + huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_DECRYPT + }]; + return properties; +} + +function GetAesEncryptProperties() { + let properties: Array = [{ + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_AES + }, { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_AES_KEY_SIZE_128 + }, { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_ENCRYPT + }, { + tag: huks.HuksTag.HUKS_TAG_PADDING, + value: huks.HuksKeyPadding.HUKS_PADDING_PKCS7 + }, { + tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, + value: huks.HuksCipherMode.HUKS_MODE_CBC + }, { + tag: huks.HuksTag.HUKS_TAG_IV, + value: StringToUint8Array(IV) + }]; + return properties; +} + +function GetAesDecryptProperties() { + let properties: Array = [{ + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_AES + }, { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_AES_KEY_SIZE_128 + }, { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_DECRYPT + }, { + tag: huks.HuksTag.HUKS_TAG_PADDING, + value: huks.HuksKeyPadding.HUKS_PADDING_PKCS7 + }, { + tag: huks.HuksTag.HUKS_TAG_BLOCK_MODE, + value: huks.HuksCipherMode.HUKS_MODE_CBC + }, { + tag: huks.HuksTag.HUKS_TAG_IV, + value: StringToUint8Array(IV) + }]; + return properties; +} + +async function GenerateAesKey() { + let genProperties = GetAesGenerateProperties(); + let options: huks.HuksOptions = { + properties: genProperties + }; + + await huks.generateKeyItem(aesKeyAlias, options) + .then((data) => { + hilog.info(0x0000, 'AppDataSecurity', `promise: generate AES Key success, data = ${JSON.stringify(data)}`); + }).catch((error: Error) => { + hilog.error(0x0000, 'AppDataSecurity', `promise: generate AES Key failed, ${JSON.stringify(error)}`); + }) +} + +async function EncryptData() { + let encryptProperties = GetAesEncryptProperties(); + let options: huks.HuksOptions = { + properties: encryptProperties, + inData: StringToUint8Array(plainText) + }; + + await huks.initSession(aesKeyAlias, options) + .then((data) => { + handle = data.handle; + }).catch((error: Error) => { + hilog.error(0x0000, 'AppDataSecurity', `promise: init EncryptData failed, ${JSON.stringify(error)}`); + }) + + await huks.finishSession(handle, options) + .then((data) => { + hilog.info(0x0000, 'AppDataSecurity', + `promise: encrypt data success, data is ` + Uint8ArrayToString(data.outData as Uint8Array)); + cipherData = data.outData as Uint8Array; + }).catch((error: Error) => { + hilog.error(0x0000, 'AppDataSecurity', `promise: encrypt data failed, ${JSON.stringify(error)}`); + }) +} + +async function DecryptData() { + let decryptOptions = GetAesDecryptProperties() + let options: huks.HuksOptions = { + properties: decryptOptions, + inData: cipherData + }; + + await huks.initSession(aesKeyAlias, options) + .then((data) => { + handle = data.handle; + }).catch((error: Error) => { + hilog.error(0x0000, 'AppDataSecurity', `promise: init DecryptData failed, ${JSON.stringify(error)}`); + }) + + await huks.finishSession(handle, options) + .then((data) => { + hilog.info(0x0000, 'AppDataSecurity', + `promise: decrypt data success, data is ` + Uint8ArrayToString(data.outData as Uint8Array)); + }).catch((error: Error) => { + hilog.error(0x0000, 'AppDataSecurity', `promise: decrypt data failed, ${JSON.stringify(error)}`); + }) +} + +async function DeleteKey() { + let emptyOptions: huks.HuksOptions = { + properties: [] + }; + + await huks.deleteKeyItem(aesKeyAlias, emptyOptions) + .then((data) => { + hilog.info(0x0000, 'AppDataSecurity', `promise: delete data success`); + }).catch((error: Error) => { + hilog.error(0x0000, 'AppDataSecurity', `promise: delete data failed, ${JSON.stringify(error)}`); + }) +} \ No newline at end of file diff --git a/AppDataSecurity/entry/src/main/module.json5 b/AppDataSecurity/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..ad219d733f6afa5ea07f85f580208b08cc3b9041 --- /dev/null +++ b/AppDataSecurity/entry/src/main/module.json5 @@ -0,0 +1,50 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "phone" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ], + } + ] + } +} \ No newline at end of file diff --git a/AppDataSecurity/entry/src/main/resources/base/element/color.json b/AppDataSecurity/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02 --- /dev/null +++ b/AppDataSecurity/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/AppDataSecurity/entry/src/main/resources/base/element/string.json b/AppDataSecurity/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..cf86fd4034c24f8f4079501163f0bf9e703ec9bb --- /dev/null +++ b/AppDataSecurity/entry/src/main/resources/base/element/string.json @@ -0,0 +1,36 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "AppDataSecurity" + }, + { + "name": "file_path", + "value": "file path:" + }, + { + "name": "get_file_path", + "value": "Obtaining the common file path" + }, + { + "name": "get_el1_file_path", + "value": "Obtaining the EL1 file path" + }, + { + "name": "encrypted", + "value": "encrypted" + }, + { + "name": "decrypted", + "value": "decrypted" + } + ] +} \ No newline at end of file diff --git a/AppDataSecurity/entry/src/main/resources/base/media/background.png b/AppDataSecurity/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..f939c9fa8cc8914832e602198745f592a0dfa34d Binary files /dev/null and b/AppDataSecurity/entry/src/main/resources/base/media/background.png differ diff --git a/AppDataSecurity/entry/src/main/resources/base/media/foreground.png b/AppDataSecurity/entry/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..4483ddad1f079e1089d685bd204ee1cfe1d01902 Binary files /dev/null and b/AppDataSecurity/entry/src/main/resources/base/media/foreground.png differ diff --git a/AppDataSecurity/entry/src/main/resources/base/media/layered_image.json b/AppDataSecurity/entry/src/main/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/AppDataSecurity/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/AppDataSecurity/entry/src/main/resources/base/media/startIcon.png b/AppDataSecurity/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/AppDataSecurity/entry/src/main/resources/base/media/startIcon.png differ diff --git a/AppDataSecurity/entry/src/main/resources/base/profile/backup_config.json b/AppDataSecurity/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..78f40ae7c494d71e2482278f359ec790ca73471a --- /dev/null +++ b/AppDataSecurity/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/AppDataSecurity/entry/src/main/resources/base/profile/main_pages.json b/AppDataSecurity/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce --- /dev/null +++ b/AppDataSecurity/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/AppDataSecurity/entry/src/main/resources/en_US/element/string.json b/AppDataSecurity/entry/src/main/resources/en_US/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..cf86fd4034c24f8f4079501163f0bf9e703ec9bb --- /dev/null +++ b/AppDataSecurity/entry/src/main/resources/en_US/element/string.json @@ -0,0 +1,36 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "AppDataSecurity" + }, + { + "name": "file_path", + "value": "file path:" + }, + { + "name": "get_file_path", + "value": "Obtaining the common file path" + }, + { + "name": "get_el1_file_path", + "value": "Obtaining the EL1 file path" + }, + { + "name": "encrypted", + "value": "encrypted" + }, + { + "name": "decrypted", + "value": "decrypted" + } + ] +} \ No newline at end of file diff --git a/AppDataSecurity/entry/src/main/resources/zh_CN/element/string.json b/AppDataSecurity/entry/src/main/resources/zh_CN/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..cc56e2d76d8d142cb1b81fbed136cbdbee89b98b --- /dev/null +++ b/AppDataSecurity/entry/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,36 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "模块描述" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "应用数据安全" + }, + { + "name": "file_path", + "value": "文件路径:" + }, + { + "name": "get_file_path", + "value": "获取通用文件路径" + }, + { + "name": "get_el1_file_path", + "value": "获取EL1文件路径" + }, + { + "name": "encrypted", + "value": "加密" + }, + { + "name": "decrypted", + "value": "解密" + } + ] +} \ No newline at end of file diff --git a/AppDataSecurity/hvigor/hvigor-config.json5 b/AppDataSecurity/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..06b2783670a348f95533b352c1ceda909a842bbc --- /dev/null +++ b/AppDataSecurity/hvigor/hvigor-config.json5 @@ -0,0 +1,22 @@ +{ + "modelVersion": "5.0.0", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} diff --git a/AppDataSecurity/hvigorfile.ts b/AppDataSecurity/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..f3cb9f1a87a81687554a76283af8df27d8bda775 --- /dev/null +++ b/AppDataSecurity/hvigorfile.ts @@ -0,0 +1,6 @@ +import { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} diff --git a/AppDataSecurity/oh-package.json5 b/AppDataSecurity/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..0cec98259052cc175d04dbcf61780de4bc9785f4 --- /dev/null +++ b/AppDataSecurity/oh-package.json5 @@ -0,0 +1,7 @@ +{ + "modelVersion": "5.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": {} +}