未验证 提交 82483e69 编写于 作者: O openharmony_ci 提交者: Gitee

!7887 【mothly】XTS_huks测试代码整改

Merge pull request !7887 from yuanyuhang/cherry-pick-1678350700
......@@ -1184,37 +1184,6 @@ export function SecurityHuksImportJsunit() {
done();
});
it('HUKS_Basic_Capability_Import_Reformed_0800', 0, async function (done) {
const srcKeyAlies = 'HUKS_Basic_Capability_Import_0800';
let HuksOptions = {
properties: new Array(
HuksCipherAES.HuksKeyAlgAES,
HuksCipherAES.HuksKeyPurposeENCRYPT,
HuksCipherAES.HuksKeyAESSize512,
HuksCipherAES.HuksKeyAESPADDINGNONE,
HuksCipherAES.HuksKeyAESBLOCKMODE,
HuksCipherAES.HuksKeyAESDIGESTNONE
),
inData: aes512Key,
};
if (useSoftware) {
try {
await huks.generateKeyItem(srcKeyAlies, HuksOptions)
.then(data => {
console.info(`promise: generateKeyItem success, data = ${JSON.stringify(data)}`);
})
.catch(err => {
console.error(`callback: generateKeyItem failed, code: ${err.code}, msg: ${err.message}`);
expect(err.code == 401).assertTrue();
})
} catch (err) {
console.error(`callback: generateKeyItem invalid, code: ${err.code}, msg: ${err.message}`);
expect(null).assertFail();
}
}
done();
});
it('HUKS_Basic_Capability_Import_Reformed_0900', 0, async function (done) {
const srcKeyAlies = 'HUKS_Basic_Capability_Import_0900';
let HuksOptions = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册