提交 483ffc59 编写于 作者: Q Qwink2016

modify huks case number

Signed-off-by: NQwink2016 <714794360@qq.com>
上级 43da29a8
......@@ -854,6 +854,8 @@ export function SecurityHuksAccessControlJsunit() {
expect(1342197283).assertEqual(
huks.HuksTag.HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA
);
expect(0).assertEqual(huks.HuksKeyStorageType.HUKS_STORAGE_TEMP );
expect(1).assertEqual(huks.HuksKeyStorageType.HUKS_STORAGE_PERSISTENT);
done();
});
});
......
......@@ -13,11 +13,11 @@
* limitations under the License.
*/
import { describe, it, expect } from '@ohos/hypium';
import huks from '@ohos.security.huks';
import Data from '../../../../../../utils/data.json';
import { HuksHmac } from '../../../../../../utils/param/hmac/publicHmacParam.js';
import { stringToArray } from '../../../../../../utils/param/publicFunc.js';
import { describe, it, expect } from "@ohos/hypium";
import huks from "@ohos.security.huks";
import Data from "../../../../../../utils/data.json";
import { HuksHmac } from "../../../../../../utils/param/hmac/publicHmacParam.js";
import { stringToArray } from "../../../../../../utils/param/publicFunc.js";
var handle;
let srcData63Kb = Data.Date63KB;
......@@ -28,13 +28,15 @@ function generateKey(srcKeyAlies, HuksOptions) {
huks.generateKey(srcKeyAlies, HuksOptions, function (err, data) {
try {
if (err.code !== 0) {
console.log('test generateKey err information: ' + JSON.stringify(err));
console.log(
"test generateKey err information: " + JSON.stringify(err)
);
reject(err);
} else {
resolve(data);
}
} catch (e) {
console.log('test generateKey err information: ' + JSON.stringify(e));
console.log("test generateKey err information: " + JSON.stringify(e));
reject(e);
}
});
......@@ -46,14 +48,14 @@ function init(srcKeyAlies, HuksOptions) {
huks.init(srcKeyAlies, HuksOptions, function (err, data) {
try {
if (err.code !== 0) {
console.log('test init err information: ' + JSON.stringify(err));
console.log("test init err information: " + JSON.stringify(err));
reject(err);
} else {
handle = data.handle;
resolve(data);
}
} catch (e) {
console.log('test init err information: ' + JSON.stringify(e));
console.log("test init err information: " + JSON.stringify(e));
reject(e);
}
});
......@@ -65,13 +67,13 @@ function update(handle, HuksOptions) {
huks.update(handle, HuksOptions, function (err, data) {
try {
if (err.code !== 0) {
console.log('test update err information: ' + JSON.stringify(err));
console.log("test update err information: " + JSON.stringify(err));
reject(err);
} else {
resolve(data);
}
} catch (e) {
console.log('test update err information: ' + JSON.stringify(e));
console.log("test update err information: " + JSON.stringify(e));
reject(e);
}
});
......@@ -83,13 +85,13 @@ function finish(handle, HuksOptions) {
huks.finish(handle, HuksOptions, function (err, data) {
try {
if (err.code !== 0) {
console.log('test finish err information: ' + JSON.stringify(err));
console.log("test finish err information: " + JSON.stringify(err));
reject(err);
} else {
resolve(data);
}
} catch (e) {
console.log('test finish err information: ' + JSON.stringify(e));
console.log("test finish err information: " + JSON.stringify(e));
reject(e);
}
});
......@@ -101,13 +103,13 @@ function abort(handle, HuksOptions) {
huks.abort(handle, HuksOptions, function (err, data) {
try {
if (err.code !== 0) {
console.log('test abort err information: ' + JSON.stringify(err));
console.log("test abort err information: " + JSON.stringify(err));
reject(err);
} else {
resolve(data);
}
} catch (e) {
console.log('test abort err information: ' + JSON.stringify(e));
console.log("test abort err information: " + JSON.stringify(e));
reject(e);
}
});
......@@ -119,13 +121,13 @@ function deleteKey(srcKeyAlies, HuksOptions) {
huks.deleteKey(srcKeyAlies, HuksOptions, function (err, data) {
try {
if (err.code !== 0) {
console.log('test deleteKey err information: ' + JSON.stringify(err));
console.log("test deleteKey err information: " + JSON.stringify(err));
reject(err);
} else {
resolve(data);
}
} catch (e) {
console.log('test deleteKey err information: ' + JSON.stringify(e));
console.log("test deleteKey err information: " + JSON.stringify(e));
reject(e);
}
});
......@@ -144,7 +146,7 @@ async function publicHmacUpdate(HuksOptions) {
console.log(`test update data: ${data}`);
})
.catch((err) => {
console.log('test update err information: ' + JSON.stringify(err));
console.log("test update err information: " + JSON.stringify(err));
expect(null).assertFail();
});
HuksOptions.inData = huksOptionsInData;
......@@ -152,25 +154,32 @@ async function publicHmacUpdate(HuksOptions) {
let count = Math.floor(inDataArray.length / dateSize);
let remainder = inDataArray.length % dateSize;
for (let i = 0; i < count; i++) {
HuksOptions.inData = new Uint8Array(stringToArray(huksOptionsInData).slice(dateSize * i, dateSize * (i + 1)));
HuksOptions.inData = new Uint8Array(
stringToArray(huksOptionsInData).slice(dateSize * i, dateSize * (i + 1))
);
await update(handle, HuksOptions)
.then((data) => {
console.log(`test update data: ${data}`);
})
.catch((err) => {
console.log('test update err information: ' + JSON.stringify(err));
console.log("test update err information: " + JSON.stringify(err));
expect(null).assertFail();
});
}
if (remainder !== 0) {
HuksOptions.inData = new Uint8Array(stringToArray(huksOptionsInData).slice(dateSize * count, inDataArray.length));
HuksOptions.inData = new Uint8Array(
stringToArray(huksOptionsInData).slice(
dateSize * count,
inDataArray.length
)
);
console.log(`test update HuksOptions.inData ${HuksOptions.inData}`);
await update(handle, HuksOptions)
.then((data) => {
console.log(`test update data: ${data}`);
})
.catch((err) => {
console.log('test update err information: ' + JSON.stringify(err));
console.log("test update err information: " + JSON.stringify(err));
expect(null).assertFail();
});
}
......@@ -181,7 +190,7 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
HuksOptions.properties.splice(1, 0, HuksHmac.HuksKeySIZE);
await generateKey(srcKeyAlies, HuksOptions)
.then((data) => {
console.log('test generateKey data = ' + JSON.stringify(data));
console.log("test generateKey data = " + JSON.stringify(data));
})
.catch((err) => {
console.log(`test init err: " + ${JSON.stringify(err)}`);
......@@ -199,14 +208,14 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
});
await publicHmacUpdate(HuksOptions);
if (thirdInderfaceName == 'finish') {
HuksOptions.inData = new Uint8Array(stringToArray('0'));
if (thirdInderfaceName == "finish") {
HuksOptions.inData = new Uint8Array(stringToArray("0"));
await finish(handle, HuksOptions)
.then((data) => {
console.log(`test update data: ${data}`);
})
.catch((err) => {
console.log('test update err information: ' + JSON.stringify(err));
console.log("test update err information: " + JSON.stringify(err));
expect(null).assertFail();
});
} else {
......@@ -215,7 +224,7 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
console.log(`test abort data: ${data}`);
})
.catch((err) => {
console.log('test abort err information: ' + JSON.stringify(err));
console.log("test abort err information: " + JSON.stringify(err));
expect(null).assertFail();
});
}
......@@ -226,56 +235,15 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
expect(data.errorCode == 0).assertTrue();
})
.catch((err) => {
console.log('test deleteKey err information: ' + JSON.stringify(err));
console.log("test deleteKey err information: " + JSON.stringify(err));
expect(null).assertFail();
});
}
export function SecurityHuksHmacBasicCallbackJsunit_test() {
describe('SecurityHuksHmacBasicCallbackJsunit_test', function () {
it('testHmacSHA1001', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSHA1KeyAlias001';
let HuksOptions = {
properties: new Array(HuksHmac.HuksKeyAlg, HuksHmac.HuksKeyPurpose, HuksHmac.HuksTagDigestSHA1),
inData: srcData63Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'finish');
done();
});
it('testHmacSHA1002', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSHA1KeyAlias002';
let HuksOptions = {
properties: new Array(HuksHmac.HuksKeyAlg, HuksHmac.HuksKeyPurpose, HuksHmac.HuksTagDigestSHA1),
inData: srcData63Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'abort');
done();
});
it('testHmacSHA1003', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSHA1KeyAlias003';
let HuksOptions = {
properties: new Array(HuksHmac.HuksKeyAlg, HuksHmac.HuksKeyPurpose, HuksHmac.HuksTagDigestSHA1),
inData: srcData65Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'finish');
done();
});
it('testHmacSHA1004', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSHA1KeyAlias004';
let HuksOptions = {
properties: new Array(HuksHmac.HuksKeyAlg, HuksHmac.HuksKeyPurpose, HuksHmac.HuksTagDigestSHA1),
inData: srcData65Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'abort');
done();
});
});
}
export function SecurityHuksHmacCallbackJsunit() {
describe('SecurityHuksHmacCallbackJsunit', function () {
it('testHmacSHA1001', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSHA1KeyAlias001';
describe("SecurityHuksHmacCallbackJsunit", function () {
it("testHmacSHA1001", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSHA1KeyAlias001";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -285,12 +253,12 @@ describe('SecurityHuksHmacCallbackJsunit', function () {
inData: srcData63Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'finish');
await publicHmacGenFunc(srcKeyAlies, HuksOptions, "finish");
done();
});
it('testHmacSHA1002', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSHA1KeyAlias002';
it("testHmacSHA1002", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSHA1KeyAlias002";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -299,11 +267,11 @@ describe('SecurityHuksHmacCallbackJsunit', function () {
),
inData: srcData63Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'abort');
await publicHmacGenFunc(srcKeyAlies, HuksOptions, "abort");
done();
});
it('testHmacSHA1003', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSHA1KeyAlias003';
it("testHmacSHA1003", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSHA1KeyAlias003";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -312,11 +280,11 @@ describe('SecurityHuksHmacCallbackJsunit', function () {
),
inData: srcData65Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'finish');
await publicHmacGenFunc(srcKeyAlies, HuksOptions, "finish");
done();
});
it('testHmacSHA1004', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSHA1KeyAlias004';
it("testHmacSHA1004", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSHA1KeyAlias004";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -325,11 +293,11 @@ describe('SecurityHuksHmacCallbackJsunit', function () {
),
inData: srcData65Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'abort');
await publicHmacGenFunc(srcKeyAlies, HuksOptions, "abort");
done();
});
it('testHmacSM3001', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSM3KeyAlias001';
it("testHmacSM3001", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSM3KeyAlias001";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -339,12 +307,12 @@ describe('SecurityHuksHmacCallbackJsunit', function () {
inData: srcData63Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'finish');
await publicHmacGenFunc(srcKeyAlies, HuksOptions, "finish");
done();
});
it('testHmacSM3002', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSM3KeyAlias002';
it("testHmacSM3002", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSM3KeyAlias002";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -353,11 +321,11 @@ describe('SecurityHuksHmacCallbackJsunit', function () {
),
inData: srcData63Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'abort');
await publicHmacGenFunc(srcKeyAlies, HuksOptions, "abort");
done();
});
it('testHmacSM3003', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSM3KeyAlias003';
it("testHmacSM3003", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSM3KeyAlias003";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -366,11 +334,11 @@ describe('SecurityHuksHmacCallbackJsunit', function () {
),
inData: srcData65Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'finish');
await publicHmacGenFunc(srcKeyAlies, HuksOptions, "finish");
done();
});
it('testHmacSM3004', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSM3KeyAlias004';
it("testHmacSM3004", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSM3KeyAlias004";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -379,8 +347,8 @@ describe('SecurityHuksHmacCallbackJsunit', function () {
),
inData: srcData65Kb,
};
await publicHmacGenFunc(srcKeyAlies, HuksOptions, 'abort');
await publicHmacGenFunc(srcKeyAlies, HuksOptions, "abort");
done();
});
});
});
}
......@@ -13,12 +13,11 @@
* limitations under the License.
*/
import {SecurityHuksAccessControlJsunit} from './HMAC/SecurityHuksAccessControlJsunit.test.js'
import {SecurityHuksHmacBasicCallbackJsunit_test, SecurityHuksHmacCallbackJsunit} from './HMAC/SecurityHuksHmacBasicCallbackJsunit.test.js'
import {SecurityHuksImportJsunit} from './HMAC/SecurityHuksImportJsunit.test.js'
import { SecurityHuksAccessControlJsunit } from "./HMAC/SecurityHuksAccessControlJsunit.test.js";
import { SecurityHuksHmacCallbackJsunit } from "./HMAC/SecurityHuksHmacBasicCallbackJsunit.test.js";
import { SecurityHuksImportJsunit } from "./HMAC/SecurityHuksImportJsunit.test.js";
export default function testsuite() {
SecurityHuksAccessControlJsunit()
SecurityHuksHmacBasicCallbackJsunit_test()
SecurityHuksHmacCallbackJsunit()
SecurityHuksImportJsunit()
SecurityHuksAccessControlJsunit();
SecurityHuksHmacCallbackJsunit();
SecurityHuksImportJsunit();
}
......@@ -13,11 +13,11 @@
* limitations under the License.
*/
import { describe, it, expect } from '@ohos/hypium';
import huks from '@ohos.security.huks';
import Data from '../../../../../../utils/data.json';
import { HuksHmac } from '../../../../../../utils/param/hmac/publicHmacParam.js';
import { stringToArray } from '../../../../../../utils/param/publicFunc.js';
import { describe, it, expect } from "@ohos/hypium";
import huks from "@ohos.security.huks";
import Data from "../../../../../../utils/data.json";
import { HuksHmac } from "../../../../../../utils/param/hmac/publicHmacParam.js";
import { stringToArray } from "../../../../../../utils/param/publicFunc.js";
var handle;
let srcData63Kb = Data.Date63KB;
......@@ -32,7 +32,7 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions) {
expect(data.errorCode == 0).assertTrue();
})
.catch((err) => {
console.log('test generateKey err information: ' + JSON.stringify(err));
console.log("test generateKey err information: " + JSON.stringify(err));
expect(null).assertFail();
});
HuksOptions.properties.splice(1, 1);
......@@ -63,19 +63,26 @@ async function publicHmacUpdateFunc(HuksOptions) {
let count = Math.floor(inDataArray.length / dateSize);
let remainder = inDataArray.length % dateSize;
for (let i = 0; i < count; i++) {
HuksOptions.inData = new Uint8Array(stringToArray(huksOptionsInData).slice(dateSize * i, dateSize * (i + 1)));
HuksOptions.inData = new Uint8Array(
stringToArray(huksOptionsInData).slice(dateSize * i, dateSize * (i + 1))
);
await update(handle, HuksOptions);
}
if (remainder !== 0) {
HuksOptions.inData = new Uint8Array(stringToArray(huksOptionsInData).slice(dateSize * count, inDataArray.length));
HuksOptions.inData = new Uint8Array(
stringToArray(huksOptionsInData).slice(
dateSize * count,
inDataArray.length
)
);
await update(handle, HuksOptions);
}
}
}
async function publicHmacFinish(HuksOptions, thirdInderfaceName) {
if (thirdInderfaceName == 'finish') {
HuksOptions.inData = new Uint8Array(stringToArray('0'));
if (thirdInderfaceName == "finish") {
HuksOptions.inData = new Uint8Array(stringToArray("0"));
await huks
.finish(handle, HuksOptions)
.then((data) => {
......@@ -83,10 +90,10 @@ async function publicHmacFinish(HuksOptions, thirdInderfaceName) {
expect(data.errorCode == 0).assertTrue();
})
.catch((err) => {
console.log('test finish err information: ' + err);
console.log("test finish err information: " + err);
expect(null).assertFail();
});
} else if (thirdInderfaceName == 'abort') {
} else if (thirdInderfaceName == "abort") {
await huks
.abort(handle, HuksOptions)
.then((data) => {
......@@ -94,7 +101,7 @@ async function publicHmacFinish(HuksOptions, thirdInderfaceName) {
expect(data.errorCode == 0).assertTrue();
})
.catch((err) => {
console.log('test abort err information: ' + err);
console.log("test abort err information: " + err);
expect(null).assertFail();
});
}
......@@ -109,7 +116,7 @@ async function publicHmacDelete(srcKeyAlies, HuksOptions) {
expect(data.errorCode == 0).assertTrue();
})
.catch((err) => {
console.log('test deleteKey err information: ' + JSON.stringify(err));
console.log("test deleteKey err information: " + JSON.stringify(err));
expect(null).assertFail();
});
}
......@@ -134,54 +141,71 @@ async function update(handle, HuksOptions) {
expect(data.errorCode == 0).assertTrue();
})
.catch((err) => {
console.log('test update err information: ' + err);
console.log("test update err information: " + err);
expect(null).assertFail();
});
}
export default function SecurityHuksHmacBasicPromiseJsunit() {
describe('SecurityHuksHmacBasicPromiseJsunit', function () {
it('testHmac101', 0, async function (done) {
const srcKeyAlies = 'testHmacDigestSHA1KeyAlias101';
describe("SecurityHuksHmacBasicPromiseJsunit", function () {
it("testHmac101", 0, async function (done) {
const srcKeyAlies = "testHmacDigestSHA1KeyAlias101";
let HuksOptions = {
properties: new Array(HuksHmac.HuksKeyAlg, HuksHmac.HuksKeyPurpose, HuksHmac.HuksTagDigestSHA1),
properties: new Array(
HuksHmac.HuksKeyAlg,
HuksHmac.HuksKeyPurpose,
HuksHmac.HuksTagDigestSHA1
),
inData: srcData63Kb,
};
await publicHmacFunc(srcKeyAlies, HuksOptions, 'finish');
await publicHmacFunc(srcKeyAlies, HuksOptions, "finish");
done();
});
it('testHmac102', 0, async function (done) {
const srcKeyAlies = 'testHmacDigestSHA1KeyAlias102';
it("testHmac102", 0, async function (done) {
const srcKeyAlies = "testHmacDigestSHA1KeyAlias102";
let HuksOptions = {
properties: new Array(HuksHmac.HuksKeyAlg, HuksHmac.HuksKeyPurpose, HuksHmac.HuksTagDigestSHA1),
properties: new Array(
HuksHmac.HuksKeyAlg,
HuksHmac.HuksKeyPurpose,
HuksHmac.HuksTagDigestSHA1
),
inData: srcData63Kb,
};
await publicHmacFunc(srcKeyAlies, HuksOptions, 'abort');
await publicHmacFunc(srcKeyAlies, HuksOptions, "abort");
done();
});
it('testHmac103', 0, async function (done) {
const srcKeyAlies = 'testHmacDigestSHA1KeyAlias103';
it("testHmac103", 0, async function (done) {
const srcKeyAlies = "testHmacDigestSHA1KeyAlias103";
let HuksOptions = {
properties: new Array(HuksHmac.HuksKeyAlg, HuksHmac.HuksKeyPurpose, HuksHmac.HuksTagDigestSHA1),
properties: new Array(
HuksHmac.HuksKeyAlg,
HuksHmac.HuksKeyPurpose,
HuksHmac.HuksTagDigestSHA1
),
inData: srcData65Kb,
};
await publicHmacFunc(srcKeyAlies, HuksOptions, 'finish');
await publicHmacFunc(srcKeyAlies, HuksOptions, "finish");
done();
});
it('testHmac104', 0, async function (done) {
const srcKeyAlies = 'testHmacDigestSHA1KeyAlias104';
it("testHmac104", 0, async function (done) {
const srcKeyAlies = "testHmacDigestSHA1KeyAlias104";
let HuksOptions = {
properties: new Array(HuksHmac.HuksKeyAlg, HuksHmac.HuksKeyPurpose, HuksHmac.HuksTagDigestSHA1),
properties: new Array(
HuksHmac.HuksKeyAlg,
HuksHmac.HuksKeyPurpose,
HuksHmac.HuksTagDigestSHA1
),
inData: srcData65Kb,
};
await publicHmacFunc(srcKeyAlies, HuksOptions, 'abort');
await publicHmacFunc(srcKeyAlies, HuksOptions, "abort");
done();
});
it('testHmacSM3001', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSM3KeyAlias001';
it("testHmacSM3101", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSM3KeyAlias001";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -191,12 +215,12 @@ describe('SecurityHuksHmacBasicPromiseJsunit', function () {
inData: srcData63Kb,
};
await publicHmacFunc(srcKeyAlies, HuksOptions, 'finish');
await publicHmacFunc(srcKeyAlies, HuksOptions, "finish");
done();
});
it('testHmacSM3002', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSM3KeyAlias002';
it("testHmacSM3102", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSM3KeyAlias002";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -205,11 +229,12 @@ describe('SecurityHuksHmacBasicPromiseJsunit', function () {
),
inData: srcData63Kb,
};
await publicHmacFunc(srcKeyAlies, HuksOptions, 'abort');
await publicHmacFunc(srcKeyAlies, HuksOptions, "abort");
done();
});
it('testHmacSM3003', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSM3KeyAlias003';
it("testHmacSM3103", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSM3KeyAlias003";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -218,11 +243,12 @@ describe('SecurityHuksHmacBasicPromiseJsunit', function () {
),
inData: srcData65Kb,
};
await publicHmacFunc(srcKeyAlies, HuksOptions, 'finish');
await publicHmacFunc(srcKeyAlies, HuksOptions, "finish");
done();
});
it('testHmacSM3004', 0, async function (done) {
let srcKeyAlies = 'testHmacDigestSM3KeyAlias004';
it("testHmacSM3104", 0, async function (done) {
let srcKeyAlies = "testHmacDigestSM3KeyAlias004";
let HuksOptions = {
properties: new Array(
HuksHmac.HuksKeyAlg,
......@@ -231,8 +257,8 @@ describe('SecurityHuksHmacBasicPromiseJsunit', function () {
),
inData: srcData65Kb,
};
await publicHmacFunc(srcKeyAlies, HuksOptions, 'abort');
await publicHmacFunc(srcKeyAlies, HuksOptions, "abort");
done();
});
});
});
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册