提交 77aab6fd 编写于 作者: W w00835064

黄区TA实现不同,对某些用例设置只在蓝区执

Change-Id: I0a20dd6b9d93c313850ea4b239443a2b535871d1
Signed-off-by: Nw00835064 <wangxiyang4@huawei.com>
上级 6044d2ac
......@@ -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",
]
}
......
......@@ -13,22 +13,28 @@
* 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 () {
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';
......@@ -49,8 +55,10 @@ describe('SecurityHuksDHBasicAbort63KBCallbackJsunit', function () {
),
inData: srcData63Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort');
};
done();
});
});
});
}
......@@ -13,22 +13,29 @@
* 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 () {
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';
......@@ -49,8 +56,10 @@ describe('SecurityHuksDHBasicAbort65KBCallbackJsunit', function () {
),
inData: srcData65Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort');
};
done();
});
});
});
}
......@@ -13,22 +13,28 @@
* 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 () {
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';
......@@ -49,8 +55,10 @@ describe('SecurityHuksDHBasicFinish63KBCallbackJsunit', function () {
),
inData: srcData63Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish');
};
done();
});
});
});
}
......@@ -13,22 +13,28 @@
* 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 () {
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';
......@@ -49,8 +55,10 @@ describe('SecurityHuksDHBasicFinish65KBCallbackJsunit', function () {
),
inData: srcData65Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'finish');
};
done();
});
});
});
}
......@@ -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,7 +29,11 @@ let HuksOptions63kb = {
};
export default function SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit() {
describe('SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit', function () {
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';
......@@ -49,8 +54,10 @@ describe('SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit', function () {
),
inData: srcData63Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort');
};
done();
});
});
});
}
......@@ -13,22 +13,26 @@
* 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 () {
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';
......@@ -49,8 +53,10 @@ describe('SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit', function () {
),
inData: srcData65Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort');
};
done();
});
});
});
}
......@@ -13,22 +13,26 @@
* 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 () {
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';
......@@ -49,8 +53,10 @@ describe('SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit', function () {
),
inData: srcData63Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish');
};
done();
});
});
});
}
......@@ -13,22 +13,27 @@
* 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 () {
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';
......@@ -49,8 +54,10 @@ describe('SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit', function () {
),
inData: srcData65Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'finish');
};
done();
});
});
});
}
......@@ -13,22 +13,28 @@
* 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 () {
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';
......@@ -49,8 +55,10 @@ describe('SecurityHuksDHBasicAbort63KBCallbackJsunit', function () {
),
inData: srcData63Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort');
};
done();
});
});
});
}
......@@ -13,22 +13,28 @@
* 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 () {
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';
......@@ -49,8 +55,10 @@ describe('SecurityHuksDHBasicAbort65KBCallbackJsunit', function () {
),
inData: srcData65Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort');
};
done();
});
});
});
}
......@@ -13,22 +13,28 @@
* 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 () {
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';
......@@ -49,8 +55,10 @@ describe('SecurityHuksDHBasicFinish63KBCallbackJsunit', function () {
),
inData: srcData63Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish');
};
done();
});
});
});
}
......@@ -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);
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions2048, huksOptionsFinish, 'finish');
};
done();
});
......
......@@ -13,22 +13,29 @@
* 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 () {
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';
......@@ -49,8 +56,10 @@ describe('SecurityHuksAgreeDHBasicAbort63KBPromiseJsunit', function () {
),
inData: srcData63Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'abort');
};
done();
});
});
});
}
......@@ -13,22 +13,26 @@
* 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 () {
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';
......@@ -49,8 +53,10 @@ describe('SecurityHuksAgreeDHBasicAbort65KBPromiseJsunit', function () {
),
inData: srcData65Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions65kb, huksOptionsFinish, 'abort');
};
done();
});
});
});
}
......@@ -13,22 +13,26 @@
* 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 () {
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';
......@@ -49,8 +53,10 @@ describe('SecurityHuksAgreeDHBasicFinish63KBPromiseJsunit', function () {
),
inData: srcData63Kb,
};
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions63kb, huksOptionsFinish, 'finish');
};
done();
});
});
});
}
......@@ -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,7 +49,7 @@ function makehuksOptionsFinish(srcKeyAliesFirst){
return huksOptionsFinish;
}
function makehuksOptionsDerive(srcKeyAliesFirst){
function makehuksOptionsDerive(srcKeyAliesFirst) {
let huksOptionsFinish = {
properties: new Array(
HuksAgreeDH.HuksKeyALGORITHMAES,
......@@ -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);
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);
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);
if (useSoftware) {
await publicAgreeFunc(srcKeyAliesFirst, srcKeyAliesSecond, HuksOptions2048, huksOptionsFinish, 'finish');
};
done();
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册