From 77aab6fd13b9858193ad799a4b2f852a05e0c8a8 Mon Sep 17 00:00:00 2001 From: w00835064 Date: Mon, 28 Aug 2023 22:44:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=84=E5=8C=BATA=E5=AE=9E=E7=8E=B0=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=EF=BC=8C=E5=AF=B9=E6=9F=90=E4=BA=9B=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=8F=AA=E5=9C=A8=E8=93=9D=E5=8C=BA=E6=89=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0a20dd6b9d93c313850ea4b239443a2b535871d1 Signed-off-by: w00835064 --- security/huks_napi_BasicTest/BUILD.gn | 2 +- ...HuksDHBasicAbort63KBCallbackJsunit.test.js | 60 ++++++++++-------- ...HuksDHBasicAbort65KBCallbackJsunit.test.js | 61 +++++++++++-------- ...uksDHBasicFinish63KBCallbackJsunit.test.js | 60 ++++++++++-------- ...uksDHBasicFinish65KBCallbackJsunit.test.js | 60 ++++++++++-------- ...AgreeDHBasicAbort63KBPromiseJsunit.test.js | 59 ++++++++++-------- ...AgreeDHBasicAbort65KBPromiseJsunit.test.js | 60 ++++++++++-------- ...greeDHBasicFinish63KBPromiseJsunit.test.js | 60 ++++++++++-------- ...greeDHBasicFinish65KBPromiseJsunit.test.js | 59 ++++++++++-------- ...HuksDHBasicAbort63KBCallbackJsunit.test.js | 60 ++++++++++-------- ...HuksDHBasicAbort65KBCallbackJsunit.test.js | 60 ++++++++++-------- ...uksDHBasicFinish63KBCallbackJsunit.test.js | 60 ++++++++++-------- ...uksDHBasicFinish65KBCallbackJsunit.test.js | 5 +- ...AgreeDHBasicAbort63KBPromiseJsunit.test.js | 61 +++++++++++-------- ...AgreeDHBasicAbort65KBPromiseJsunit.test.js | 60 ++++++++++-------- ...greeDHBasicFinish63KBPromiseJsunit.test.js | 60 ++++++++++-------- ...greeDHBasicFinish65KBPromiseJsunit.test.js | 29 ++++++--- 17 files changed, 497 insertions(+), 379 deletions(-) diff --git a/security/huks_napi_BasicTest/BUILD.gn b/security/huks_napi_BasicTest/BUILD.gn index 552b598e1..5d31e36a9 100644 --- a/security/huks_napi_BasicTest/BUILD.gn +++ b/security/huks_napi_BasicTest/BUILD.gn @@ -37,7 +37,6 @@ ohos_moduletest_suite("ActsHuksNAPITest") { part_name = "huks" sources = [ - "src/huks_agree_dh_test.cpp", "src/huks_agree_ecdh_test.cpp", "src/huks_agree_ecdh_test_common.cpp", "src/huks_agree_x25519_test.cpp", @@ -71,6 +70,7 @@ ohos_moduletest_suite("ActsHuksNAPITest") { "src/huks_attest_test.cpp", "src/huks_attest_test_common.cpp", "src/huks_signverify_dsa_test.cpp", + "src/huks_agree_dh_test.cpp", ] } diff --git a/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort63KBCallbackJsunit.test.js b/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort63KBCallbackJsunit.test.js index f066bdcc7..e745a48f4 100644 --- a/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort63KBCallbackJsunit.test.js +++ b/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort63KBCallbackJsunit.test.js @@ -13,44 +13,52 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it,beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreeCallback'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData63 = Data.Date63KB; let srcData63Kb = stringToUint8Array(srcData63); +let useSoftware = true; let HuksOptions63kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData63Kb, }; export default function SecurityHuksDHBasicAbort63KBCallbackJsunit() { -describe('SecurityHuksDHBasicAbort63KBCallbackJsunit', function () { - it('testAgreeDH002', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_01_001'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_02_001'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData63Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort'); - done(); + describe('SecurityHuksDHBasicAbort63KBCallbackJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + + it('testAgreeDH002', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_01_001'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_02_001'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData63Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort65KBCallbackJsunit.test.js b/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort65KBCallbackJsunit.test.js index 972f8634f..38d8b6930 100644 --- a/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort65KBCallbackJsunit.test.js +++ b/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort65KBCallbackJsunit.test.js @@ -13,44 +13,53 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it,beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreeCallback'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData65 = Data.Date65KB; let srcData65Kb = stringToUint8Array(srcData65); +let useSoftware = true; + let HuksOptions65kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData65Kb, }; export default function SecurityHuksDHBasicAbort65KBCallbackJsunit() { -describe('SecurityHuksDHBasicAbort65KBCallbackJsunit', function () { - it('testAgreeDH004', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_01_001'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_02_001'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData65Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort'); - done(); + describe('SecurityHuksDHBasicAbort65KBCallbackJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + + it('testAgreeDH004', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_01_001'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_02_001'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData65Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish63KBCallbackJsunit.test.js b/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish63KBCallbackJsunit.test.js index 961d30575..2e5606aa2 100644 --- a/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish63KBCallbackJsunit.test.js +++ b/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish63KBCallbackJsunit.test.js @@ -13,44 +13,52 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it,beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreeCallback'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData63 = Data.Date63KB; let srcData63Kb = stringToUint8Array(srcData63); +let useSoftware = true; let HuksOptions63kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData63Kb, }; export default function SecurityHuksDHBasicFinish63KBCallbackJsunit() { -describe('SecurityHuksDHBasicFinish63KBCallbackJsunit', function () { - it('testAgreeDH001', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_01_001'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_02_001'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData63Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish'); - done(); + describe('SecurityHuksDHBasicFinish63KBCallbackJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + + it('testAgreeDH001', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_01_001'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_02_001'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData63Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish65KBCallbackJsunit.test.js b/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish65KBCallbackJsunit.test.js index 57dccdde4..41bd3af01 100644 --- a/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish65KBCallbackJsunit.test.js +++ b/security/security_huks_basic/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish65KBCallbackJsunit.test.js @@ -13,44 +13,52 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it,beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreeCallback'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData65 = Data.Date65KB; let srcData65Kb = stringToUint8Array(srcData65); +let useSoftware = true; let HuksOptions65kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData65Kb, }; export default function SecurityHuksDHBasicFinish65KBCallbackJsunit() { -describe('SecurityHuksDHBasicFinish65KBCallbackJsunit', function () { - it('testAgreeDH003', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_01_001'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_02_001'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData65Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'finish'); - done(); + describe('SecurityHuksDHBasicFinish65KBCallbackJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + + it('testAgreeDH003', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_01_001'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_02_001'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData65Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'finish'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit.test.js b/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit.test.js index d782297b4..86680e023 100644 --- a/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit.test.js +++ b/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit.test.js @@ -13,14 +13,15 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it, beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreePromise'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData63 = Data.Date63KB; let srcData63Kb = stringToUint8Array(srcData63); +let useSoftware = true; let HuksOptions63kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), @@ -28,29 +29,35 @@ let HuksOptions63kb = { }; export default function SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit() { -describe('SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit', function () { - it('testAgreeDH102', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_01_101'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_02_101'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData63Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort'); - done(); + describe('SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + it('testAgreeDH102', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_01_101'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_02_101'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData63Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit.test.js b/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit.test.js index 652368a20..b330ce41a 100644 --- a/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit.test.js +++ b/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit.test.js @@ -13,44 +13,50 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it, beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreePromise'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData65 = Data.Date65KB; let srcData65Kb = stringToUint8Array(srcData65); - +let useSoftware = true; let HuksOptions65kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData65Kb, }; export default function SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit() { -describe('SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit', function () { - it('testAgreeDH104', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_01_101'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_02_101'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData65Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort'); - done(); + describe('SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + it('testAgreeDH104', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_01_101'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_02_101'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData65Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit.test.js b/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit.test.js index 9fca85d60..9803fb289 100644 --- a/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit.test.js +++ b/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit.test.js @@ -13,44 +13,50 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it, beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreePromise'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData63 = Data.Date63KB; let srcData63Kb = stringToUint8Array(srcData63); - +let useSoftware = true; let HuksOptions63kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData63Kb, }; export default function SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit() { -describe('SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit', function () { - it('testAgreeDH101', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_01_101'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_02_101'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData63Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish'); - done(); + describe('SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + it('testAgreeDH101', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_01_101'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_02_101'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData63Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit.test.js b/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit.test.js index adbdd73a0..b18dd4a1b 100644 --- a/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit.test.js +++ b/security/security_huks_basic/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit.test.js @@ -13,44 +13,51 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it, beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreePromise'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData65 = Data.Date65KB; let srcData65Kb = stringToUint8Array(srcData65); +let useSoftware = true; let HuksOptions65kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData65Kb, }; export default function SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit() { -describe('SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit', function () { - it('testAgreeDH103', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_01_101'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_02_101'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData65Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'finish'); - done(); + describe('SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + it('testAgreeDH103', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_01_101'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_02_101'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData65Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'finish'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort63KBCallbackJsunit.test.js b/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort63KBCallbackJsunit.test.js index 0181b281b..d389231b6 100644 --- a/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort63KBCallbackJsunit.test.js +++ b/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort63KBCallbackJsunit.test.js @@ -13,44 +13,52 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it ,beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreeCallback'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData63 = Data.Date63KB; let srcData63Kb = stringToUint8Array(srcData63); +let useSoftware = true; let HuksOptions63kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData63Kb, }; export default function SecurityHuksDHBasicAbort63KBCallbackJsunit() { -describe('SecurityHuksDHBasicAbort63KBCallbackJsunit', function () { - it('testReformedAgreeDH002', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_01_001'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_02_001'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData63Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort'); - done(); + describe('SecurityHuksDHBasicAbort63KBCallbackJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + + it('testReformedAgreeDH002', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_01_001'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_02_001'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData63Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort65KBCallbackJsunit.test.js b/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort65KBCallbackJsunit.test.js index e4f69c96e..107b7f973 100644 --- a/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort65KBCallbackJsunit.test.js +++ b/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicAbort65KBCallbackJsunit.test.js @@ -13,44 +13,52 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it,beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreeCallback'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData65 = Data.Date65KB; let srcData65Kb = stringToUint8Array(srcData65); +let useSoftware = true; let HuksOptions65kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData65Kb, }; export default function SecurityHuksDHBasicAbort65KBCallbackJsunit() { -describe('SecurityHuksDHBasicAbort65KBCallbackJsunit', function () { - it('testReformedAgreeDH004', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_01_001'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_02_001'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData65Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort'); - done(); + describe('SecurityHuksDHBasicAbort65KBCallbackJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + + it('testReformedAgreeDH004', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_01_001'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_02_001'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData65Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish63KBCallbackJsunit.test.js b/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish63KBCallbackJsunit.test.js index 80e8dec30..dfcba98c9 100644 --- a/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish63KBCallbackJsunit.test.js +++ b/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish63KBCallbackJsunit.test.js @@ -13,44 +13,52 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it,beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreeCallback'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData63 = Data.Date63KB; let srcData63Kb = stringToUint8Array(srcData63); +let useSoftware = true; let HuksOptions63kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData63Kb, }; export default function SecurityHuksDHBasicFinish63KBCallbackJsunit() { -describe('SecurityHuksDHBasicFinish63KBCallbackJsunit', function () { - it('testReformedAgreeDH001', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_01_001'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_02_001'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData63Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish'); - done(); + describe('SecurityHuksDHBasicFinish63KBCallbackJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + + it('testReformedAgreeDH001', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_01_001'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_02_001'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData63Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish65KBCallbackJsunit.test.js b/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish65KBCallbackJsunit.test.js index 498abb07b..d0af1800a 100644 --- a/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish65KBCallbackJsunit.test.js +++ b/security/security_huks_reformed_test/huks_agree_callback_BasicTest/src/main/js/test/Agree/SecurityHuksDHBasicFinish65KBCallbackJsunit.test.js @@ -23,6 +23,7 @@ let srcData65 = Data.Date65KB; let srcData65Kb = stringToUint8Array(srcData65); let useSoftware = true; + let HuksOptions2048 = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData65Kb, @@ -69,7 +70,9 @@ export default function SecurityHuksDHBasicFinish65KBCallbackJsunit() { const srcKeyAliesFirst = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_01_001'; const srcKeyAliesSecond = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_02_001'; let huksOptionsFinish = makehuksOptionsFinish(srcKeyAliesFirst); - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions2048, huksOptionsFinish, 'finish'); + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions2048, huksOptionsFinish, 'finish'); + }; done(); }); diff --git a/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit.test.js b/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit.test.js index 9c443853f..c4e76f08b 100644 --- a/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit.test.js +++ b/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit.test.js @@ -13,44 +13,53 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it,beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreePromise'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData63 = Data.Date63KB; let srcData63Kb = stringToUint8Array(srcData63); +let useSoftware = true; + let HuksOptions63kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData63Kb, }; export default function SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit() { -describe('SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit', function () { - it('testReformedAgreeDH102', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_01_101'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_02_101'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData63Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort'); - done(); + describe('SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + + it('testReformedAgreeDH102', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_01_101'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_02_101'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData63Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit.test.js b/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit.test.js index d841df504..55ec40c0c 100644 --- a/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit.test.js +++ b/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit.test.js @@ -13,44 +13,50 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it, beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreePromise'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData65 = Data.Date65KB; let srcData65Kb = stringToUint8Array(srcData65); - +let useSoftware = true; let HuksOptions65kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData65Kb, }; export default function SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit() { -describe('SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit', function () { - it('testReformedAgreeDH104', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_01_101'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_02_101'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData65Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort'); - done(); + describe('SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + it('testReformedAgreeDH104', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_01_101'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_02_101'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData65Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit.test.js b/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit.test.js index 26a2632bd..c53ded7da 100644 --- a/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit.test.js +++ b/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit.test.js @@ -13,44 +13,50 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it,beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreePromise'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData63 = Data.Date63KB; let srcData63Kb = stringToUint8Array(srcData63); - +let useSoftware = true; let HuksOptions63kb = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData63Kb, }; export default function SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit() { -describe('SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit', function () { - it('testReformedAgreeDH101', 0, async function (done) { - const srcKeyAliesFirst = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_01_101'; - const srcKeyAliesSecond = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_02_101'; - let huksOptionsFinish = { - properties: new Array( - HuksAgreeDH.HuksKeySTORAGE, - HuksAgreeDH.HuksKeyISKEYALIAS, - HuksAgreeDH.HuksKeyALGORITHMAES, - HuksAgreeDH.HuksKeySIZE256, - HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, - HuksAgreeDH.HuksKeyDIGESTNONE, - { - tag: HksTag.HKS_TAG_KEY_ALIAS, - value: stringToUint8Array(srcKeyAliesFirst), - }, - HuksAgreeDH.HuksKeyPADDINGNONE, - HuksAgreeDH.HuksKeyBLOCKMODEECB - ), - inData: srcData63Kb, - }; - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish'); - done(); + describe('SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) + it('testReformedAgreeDH101', 0, async function (done) { + const srcKeyAliesFirst = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_01_101'; + const srcKeyAliesSecond = 'testAgreeDHSize2048Finish63KBAgreeKeyAlias_02_101'; + let huksOptionsFinish = { + properties: new Array( + HuksAgreeDH.HuksKeySTORAGE, + HuksAgreeDH.HuksKeyISKEYALIAS, + HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeySIZE256, + HuksAgreeDH.HuksKeyPurposeENCRYPTDECRYPT, + HuksAgreeDH.HuksKeyDIGESTNONE, + { + tag: HksTag.HKS_TAG_KEY_ALIAS, + value: stringToUint8Array(srcKeyAliesFirst), + }, + HuksAgreeDH.HuksKeyPADDINGNONE, + HuksAgreeDH.HuksKeyBLOCKMODEECB + ), + inData: srcData63Kb, + }; + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish'); + }; + done(); + }); }); -}); } diff --git a/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit.test.js b/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit.test.js index 417ddfc22..57e46ff63 100644 --- a/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit.test.js +++ b/security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit.test.js @@ -13,21 +13,22 @@ * limitations under the License. */ -import { describe, it } from '@ohos/hypium'; +import { describe, it,beforeAll } from '@ohos/hypium'; import * as Data from '../../../../../../utils/data.json'; -import { stringToUint8Array } from '../../../../../../utils/param/publicFunc'; +import { stringToUint8Array, checkSoftware } from '../../../../../../utils/param/publicFunc'; import { HuksAgreeDH } from '../../../../../../utils/param/agree/publicAgreeParam'; import { publicAgreeFunc } from '../../../../../../utils/param/agree/publicAgreePromise'; import { HksTag } from '../../../../../../utils/param/publicParam'; let srcData65 = Data.Date65KB; let srcData65Kb = stringToUint8Array(srcData65); +let useSoftware = true; let HuksOptions2048 = { properties: new Array(HuksAgreeDH.HuksKeyAlgDH, HuksAgreeDH.HuksKeyPurposeDH, HuksAgreeDH.HuksKeyDHSize2048), inData: srcData65Kb, }; -function makehuksOptionsFinish(srcKeyAliesFirst){ +function makehuksOptionsFinish(srcKeyAliesFirst) { let huksOptionsFinish = { properties: new Array( HuksAgreeDH.HuksKeySTORAGE, @@ -48,10 +49,10 @@ function makehuksOptionsFinish(srcKeyAliesFirst){ return huksOptionsFinish; } -function makehuksOptionsDerive(srcKeyAliesFirst){ +function makehuksOptionsDerive(srcKeyAliesFirst) { let huksOptionsFinish = { properties: new Array( - HuksAgreeDH.HuksKeyALGORITHMAES, + HuksAgreeDH.HuksKeyALGORITHMAES, HuksAgreeDH.HuksKeyPurposeDERIVE, HuksAgreeDH.HuksKeyDIGESTSHA256, HuksAgreeDH.HuksKeySIZE256, @@ -69,7 +70,7 @@ function makehuksOptionsDerive(srcKeyAliesFirst){ return huksOptionsFinish; } -function makehuksOptionsHmac(srcKeyAliesFirst){ +function makehuksOptionsHmac(srcKeyAliesFirst) { let huksOptionsFinish = { properties: new Array( HuksAgreeDH.HuksKeyALGORITHMHMAC, @@ -92,11 +93,17 @@ function makehuksOptionsHmac(srcKeyAliesFirst){ export default function SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit() { describe('SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit', function () { + beforeAll(async function (done) { + useSoftware = await checkSoftware(); + done(); + }) it('testReformedAgreeDH103', 0, async function (done) { const srcKeyAliesFirst = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_01_101'; const srcKeyAliesSecond = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_02_101'; let huksOptionsFinish = makehuksOptionsFinish(srcKeyAliesFirst); - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions2048, huksOptionsFinish, 'finish'); + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions2048, huksOptionsFinish, 'finish'); + }; done(); }); @@ -104,7 +111,9 @@ export default function SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit() { const srcKeyAliesFirst = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_01_108'; const srcKeyAliesSecond = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_02_108'; let huksOptionsFinish = makehuksOptionsDerive(srcKeyAliesFirst); - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions2048, huksOptionsFinish, 'finish'); + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions2048, huksOptionsFinish, 'finish'); + }; done(); }); @@ -112,7 +121,9 @@ export default function SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit() { const srcKeyAliesFirst = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_01_130'; const srcKeyAliesSecond = 'testAgreeDHSize2048Finish65KBAgreeKeyAlias_02_130'; let huksOptionsFinish = makehuksOptionsHmac(srcKeyAliesFirst); - await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions2048, huksOptionsFinish, 'finish'); + if (useSoftware) { + await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions2048, huksOptionsFinish, 'finish'); + }; done(); }); }); -- GitLab