From 10d3572ae48d0a0e8d45403fc8397a07a0c2dadd Mon Sep 17 00:00:00 2001 From: lon9 <815882449@qq.com> Date: Wed, 2 Apr 2025 14:59:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=BD=BB=E9=87=8F=E7=BA=A7=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E7=A9=BF=E6=88=B4=E5=BC=80=E5=8F=91=E6=8C=87=E5=AF=BC?= =?UTF-8?q?=E5=90=8C=E6=BA=90=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entry/src/main/js/MainAbility/security/RSA.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LiteWearable/entry/src/main/js/MainAbility/security/RSA.js b/LiteWearable/entry/src/main/js/MainAbility/security/RSA.js index 10848c2a..73469f31 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/security/RSA.js +++ b/LiteWearable/entry/src/main/js/MainAbility/security/RSA.js @@ -2,7 +2,7 @@ // [Start rsa_decrypt] import huks from '@ohos.security.huks'; -// [Start res_encrypt] +// [Start rsa_encrypt] // 别名,用于区分生成的KEY const RSA_KEY_ALIAS = 'RSAKeyAlias'; // 自定义密钥长度必须在1024 -2048之间,且是8的倍数 @@ -18,7 +18,7 @@ let cipherText = ''; let handle; // [EndExclude rsa_generate] -// [StartExclude res_encrypt] +// [StartExclude rsa_encrypt] // [StartExclude rsa_decrypt] function getRSAGenProperties() { let properties = new Array(); @@ -55,7 +55,7 @@ function generateRSAKey() { } // [End rsa_generate] -// [EndExclude res_encrypt] +// [EndExclude rsa_encrypt] function getRSAEncryptProperties() { let properties = new Array(); let index = 0; @@ -172,7 +172,7 @@ function stringToUint8Array(str) { return new Uint8Array(arr); } -// [End res_encrypt] +// [End rsa_encrypt] // [EndExclude rsa_decrypt] function getRSADecryptProperties() { let properties = new Array(); -- Gitee From 50073662db23dfa738b2ba14d6c2ad175489f21a Mon Sep 17 00:00:00 2001 From: lon9 <815882449@qq.com> Date: Wed, 2 Apr 2025 15:03:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=BD=BB=E9=87=8F=E7=BA=A7=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E7=A9=BF=E6=88=B4=E5=BC=80=E5=8F=91=E6=8C=87=E5=AF=BC?= =?UTF-8?q?=E5=90=8C=E6=BA=90=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LiteWearable/entry/src/main/js/MainAbility/security/KeyAlias.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LiteWearable/entry/src/main/js/MainAbility/security/KeyAlias.js b/LiteWearable/entry/src/main/js/MainAbility/security/KeyAlias.js index 9c4519c1..2bf66909 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/security/KeyAlias.js +++ b/LiteWearable/entry/src/main/js/MainAbility/security/KeyAlias.js @@ -7,7 +7,7 @@ import huks from '@ohos.security.huks'; let plainTextKey = new Uint8Array([ 0x1d, 0x2c, 0x3a, 0x4b, 0x5e, 0x6f, 0x7d, 0x8a, 0x9c, 0xab, 0xbc, 0xcd, 0xde, 0xef, 0xf1, 0x23 ]); -// [EndExclude 2] +// [EndExclude export_key] // 确定密钥别名 const KEY_ALIAS = 'keyAlias'; -- Gitee