Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
26cd889d
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
26cd889d
编写于
12月 07, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6800 【openharmony-3.2master】【安全子系统】huks派生接口新增参数
Merge pull request !6800 from yuanyuhang/master1206_1
上级
3d0a6c14
8efa9b85
变更
20
显示空白变更内容
内联
并排
Showing
20 changed file
with
61 addition
and
37 deletion
+61
-37
security/security_huks_basic/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksHKDFBasicAbort63KBCallbackJsunit.test.js
...rive/SecurityHuksHKDFBasicAbort63KBCallbackJsunit.test.js
+2
-1
security/security_huks_basic/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksHKDFBasicFinish63KBCallbackJsunit.test.js
...ive/SecurityHuksHKDFBasicFinish63KBCallbackJsunit.test.js
+2
-1
security/security_huks_basic/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksPBKDF2BasicAbort63KBCallbackJsunit.test.js
...ve/SecurityHuksPBKDF2BasicAbort63KBCallbackJsunit.test.js
+2
-1
security/security_huks_basic/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksPBKDF2BasicFinish63KBCallbackJsunit.test.js
...e/SecurityHuksPBKDF2BasicFinish63KBCallbackJsunit.test.js
+2
-1
security/security_huks_basic/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDeriveHKDFBasicAbort63KBPromiseJsunit.test.js
...SecurityHuksDeriveHKDFBasicAbort63KBPromiseJsunit.test.js
+2
-1
security/security_huks_basic/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDeriveHKDFBasicFinish63KBPromiseJsunit.test.js
...ecurityHuksDeriveHKDFBasicFinish63KBPromiseJsunit.test.js
+2
-1
security/security_huks_basic/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDerivePBKDF2BasicAbort63KBPromiseJsunit.test.js
...curityHuksDerivePBKDF2BasicAbort63KBPromiseJsunit.test.js
+2
-1
security/security_huks_basic/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDerivePBKDF2BasicFinish63KBPromiseJsunit.test.js
...urityHuksDerivePBKDF2BasicFinish63KBPromiseJsunit.test.js
+2
-1
security/security_huks_basic/utils/param/derive/publicDeriveCallback.js
...ity_huks_basic/utils/param/derive/publicDeriveCallback.js
+7
-5
security/security_huks_basic/utils/param/derive/publicDerivePromise.js
...rity_huks_basic/utils/param/derive/publicDerivePromise.js
+8
-6
security/security_huks_reformed_test/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksHKDFBasicAbort63KBCallbackJsunit.test.js
...rive/SecurityHuksHKDFBasicAbort63KBCallbackJsunit.test.js
+2
-1
security/security_huks_reformed_test/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksHKDFBasicFinish63KBCallbackJsunit.test.js
...ive/SecurityHuksHKDFBasicFinish63KBCallbackJsunit.test.js
+2
-1
security/security_huks_reformed_test/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksPBKDF2BasicAbort63KBCallbackJsunit.test.js
...ve/SecurityHuksPBKDF2BasicAbort63KBCallbackJsunit.test.js
+2
-1
security/security_huks_reformed_test/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksPBKDF2BasicFinish63KBCallbackJsunit.test.js
...e/SecurityHuksPBKDF2BasicFinish63KBCallbackJsunit.test.js
+2
-1
security/security_huks_reformed_test/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDeriveHKDFBasicAbort63KBPromiseJsunit.test.js
...SecurityHuksDeriveHKDFBasicAbort63KBPromiseJsunit.test.js
+2
-1
security/security_huks_reformed_test/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDeriveHKDFBasicFinish63KBPromiseJsunit.test.js
...ecurityHuksDeriveHKDFBasicFinish63KBPromiseJsunit.test.js
+2
-1
security/security_huks_reformed_test/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDerivePBKDF2BasicAbort63KBPromiseJsunit.test.js
...curityHuksDerivePBKDF2BasicAbort63KBPromiseJsunit.test.js
+2
-1
security/security_huks_reformed_test/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDerivePBKDF2BasicFinish63KBPromiseJsunit.test.js
...urityHuksDerivePBKDF2BasicFinish63KBPromiseJsunit.test.js
+2
-1
security/security_huks_reformed_test/utils/param/derive/publicDeriveCallback.js
..._reformed_test/utils/param/derive/publicDeriveCallback.js
+7
-5
security/security_huks_reformed_test/utils/param/derive/publicDerivePromise.js
...s_reformed_test/utils/param/derive/publicDerivePromise.js
+7
-5
未找到文件。
security/security_huks_basic/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksHKDFBasicAbort63KBCallbackJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksHKDFBasicAbort63KBCallbackJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksHKDFBasicAbort63KBCallbackJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
abort
'
);
let
deriveArray
=
new
Array
(
HuksDeriveHKDF
.
HuksKeyAlgHKDF
,
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
abort
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_basic/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksHKDFBasicFinish63KBCallbackJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksHKDFBasicFinish63KBCallbackJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksHKDFBasicFinish63KBCallbackJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
finish
'
);
let
deriveArray
=
new
Array
(
HuksDeriveHKDF
.
HuksKeyAlgHKDF
,
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
finish
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_basic/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksPBKDF2BasicAbort63KBCallbackJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksPBKDF2BasicAbort63KBCallbackJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksPBKDF2BasicAbort63KBCallbackJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
abort
'
);
let
deriveArray
=
new
Array
(
HuksDerivePBKDF2
.
HuksKeyAlgPBKDF2
,
HuksDerivePBKDF2
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
abort
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_basic/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksPBKDF2BasicFinish63KBCallbackJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksPBKDF2BasicFinish63KBCallbackJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksPBKDF2BasicFinish63KBCallbackJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
finish
'
);
let
deriveArray
=
new
Array
(
HuksDerivePBKDF2
.
HuksKeyAlgPBKDF2
,
HuksDerivePBKDF2
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
finish
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_basic/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDeriveHKDFBasicAbort63KBPromiseJsunit.test.js
浏览文件 @
26cd889d
...
@@ -54,7 +54,8 @@ describe('SecurityHuksDeriveHKDFBasicAbort63KBPromiseJsunit', function () {
...
@@ -54,7 +54,8 @@ describe('SecurityHuksDeriveHKDFBasicAbort63KBPromiseJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
abort
'
);
let
deriveArray
=
new
Array
(
HuksDeriveHKDF
.
HuksKeyAlgHKDF
,
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
abort
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_basic/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDeriveHKDFBasicFinish63KBPromiseJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksDeriveHKDFBasicFinish63KBPromiseJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksDeriveHKDFBasicFinish63KBPromiseJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
finish
'
);
let
deriveArray
=
new
Array
(
HuksDeriveHKDF
.
HuksKeyAlgHKDF
,
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
finish
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_basic/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDerivePBKDF2BasicAbort63KBPromiseJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksDerivePBKDF2BasicAbort63KBPromiseJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksDerivePBKDF2BasicAbort63KBPromiseJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
abort
'
);
let
deriveArray
=
new
Array
(
HuksDerivePBKDF2
.
HuksKeyAlgPBKDF2
,
HuksDerivePBKDF2
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
abort
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_basic/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDerivePBKDF2BasicFinish63KBPromiseJsunit.test.js
浏览文件 @
26cd889d
...
@@ -54,7 +54,8 @@ describe('SecurityHuksDerivePBKDF2BasicFinish63KBPromiseJsunit', function () {
...
@@ -54,7 +54,8 @@ describe('SecurityHuksDerivePBKDF2BasicFinish63KBPromiseJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
finish
'
);
let
deriveArray
=
new
Array
(
HuksDerivePBKDF2
.
HuksKeyAlgPBKDF2
,
HuksDerivePBKDF2
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
finish
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_basic/utils/param/derive/publicDeriveCallback.js
浏览文件 @
26cd889d
...
@@ -175,18 +175,20 @@ function deleteKey(srcKeyAlies, HuksOptions) {
...
@@ -175,18 +175,20 @@ function deleteKey(srcKeyAlies, HuksOptions) {
});
});
}
}
async
function
publicDeriveFunc
(
srcKeyAlies
,
HuksOptions
,
huksOptionsFinish
,
thirdInderfaceName
)
{
async
function
publicDeriveFunc
(
srcKeyAlies
,
HuksOptions
,
huksOptionsFinish
,
deriveArray
,
thirdInderfaceName
)
{
try
{
try
{
await
publicDeriveGenFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveGenFunc
(
srcKeyAlies
,
HuksOptions
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyAlgHKDF
);
let
deriveArrAlg
=
HuksOptions
.
properties
[
0
];
HuksOptions
.
properties
.
splice
(
3
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
let
deriveArrLen
=
HuksOptions
.
properties
[
3
];
HuksOptions
.
properties
.
splice
(
0
,
1
,
deriveArray
[
0
]);
HuksOptions
.
properties
.
splice
(
3
,
1
,
deriveArray
[
1
]);
await
publicDeriveInitFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveInitFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveUpdateFunc
(
HuksOptions
);
await
publicDeriveUpdateFunc
(
HuksOptions
);
await
publicDeriveFinishAbortFunc
(
huksOptionsFinish
,
thirdInderfaceName
);
await
publicDeriveFinishAbortFunc
(
huksOptionsFinish
,
thirdInderfaceName
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyAlgAES
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
deriveArrAlg
);
HuksOptions
.
properties
.
splice
(
3
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyHKDFSize128
);
HuksOptions
.
properties
.
splice
(
3
,
1
,
deriveArrLen
);
await
publicDeriveDeleteFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveDeleteFunc
(
srcKeyAlies
,
HuksOptions
);
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
...
...
security/security_huks_basic/utils/param/derive/publicDerivePromise.js
浏览文件 @
26cd889d
...
@@ -100,18 +100,20 @@ async function publicDeriveDeleteFunc(srcKeyAlies, HuksOptions) {
...
@@ -100,18 +100,20 @@ async function publicDeriveDeleteFunc(srcKeyAlies, HuksOptions) {
});
});
}
}
async
function
publicDeriveFunc
(
srcKeyAlies
,
HuksOptions
,
huksOptionsFinish
,
thirdInderfaceName
)
{
async
function
publicDeriveFunc
(
srcKeyAlies
,
HuksOptions
,
huksOptionsFinish
,
deriveArray
,
thirdInderfaceName
)
{
try
{
try
{
await
publicDeriveGenFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveGenFunc
(
srcKeyAlies
,
HuksOptions
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyAlgHKDF
);
let
deriveArrAlg
=
HuksOptions
.
properties
[
0
];
HuksOptions
.
properties
.
splice
(
3
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
let
deriveArrLen
=
HuksOptions
.
properties
[
3
];
HuksOptions
.
properties
.
splice
(
0
,
1
,
deriveArray
[
0
]);
HuksOptions
.
properties
.
splice
(
3
,
1
,
deriveArray
[
1
]);
await
publicDeriveInitFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveInitFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveUpdateFunc
(
HuksOptions
);
await
publicDeriveUpdateFunc
(
HuksOptions
);
await
publicDeriveFinishAbortFunc
(
huksOptionsFinish
,
thirdInderfaceName
);
await
publicDeriveFinishAbortFunc
(
huksOptionsFinish
,
thirdInderfaceName
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyAlgAES
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
deriveArrAlg
);
HuksOptions
.
properties
.
splice
(
3
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyHKDFSize128
);
HuksOptions
.
properties
.
splice
(
3
,
1
,
deriveArrLen
);
await
publicDeriveDeleteFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveDeleteFunc
(
srcKeyAlies
,
HuksOptions
);
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
...
...
security/security_huks_reformed_test/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksHKDFBasicAbort63KBCallbackJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksHKDFBasicAbort63KBCallbackJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksHKDFBasicAbort63KBCallbackJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
abort
'
);
let
deriveArray
=
new
Array
(
HuksDeriveHKDF
.
HuksKeyAlgHKDF
,
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
abort
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_reformed_test/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksHKDFBasicFinish63KBCallbackJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksHKDFBasicFinish63KBCallbackJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksHKDFBasicFinish63KBCallbackJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
finish
'
);
let
deriveArray
=
new
Array
(
HuksDeriveHKDF
.
HuksKeyAlgHKDF
,
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
finish
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_reformed_test/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksPBKDF2BasicAbort63KBCallbackJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksPBKDF2BasicAbort63KBCallbackJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksPBKDF2BasicAbort63KBCallbackJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
abort
'
);
let
deriveArray
=
new
Array
(
HuksDerivePBKDF2
.
HuksKeyAlgPBKDF2
,
HuksDerivePBKDF2
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
abort
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_reformed_test/huks_derive_callback_BasicTest/src/main/js/test/Derive/SecurityHuksPBKDF2BasicFinish63KBCallbackJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksPBKDF2BasicFinish63KBCallbackJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksPBKDF2BasicFinish63KBCallbackJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
finish
'
);
let
deriveArray
=
new
Array
(
HuksDerivePBKDF2
.
HuksKeyAlgPBKDF2
,
HuksDerivePBKDF2
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
finish
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_reformed_test/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDeriveHKDFBasicAbort63KBPromiseJsunit.test.js
浏览文件 @
26cd889d
...
@@ -54,7 +54,8 @@ describe('SecurityHuksDeriveHKDFBasicAbort63KBPromiseJsunit', function () {
...
@@ -54,7 +54,8 @@ describe('SecurityHuksDeriveHKDFBasicAbort63KBPromiseJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
abort
'
);
let
deriveArray
=
new
Array
(
HuksDeriveHKDF
.
HuksKeyAlgHKDF
,
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
abort
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_reformed_test/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDeriveHKDFBasicFinish63KBPromiseJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksDeriveHKDFBasicFinish63KBPromiseJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksDeriveHKDFBasicFinish63KBPromiseJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
finish
'
);
let
deriveArray
=
new
Array
(
HuksDeriveHKDF
.
HuksKeyAlgHKDF
,
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
finish
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_reformed_test/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDerivePBKDF2BasicAbort63KBPromiseJsunit.test.js
浏览文件 @
26cd889d
...
@@ -53,7 +53,8 @@ describe('SecurityHuksDerivePBKDF2BasicAbort63KBPromiseJsunit', function () {
...
@@ -53,7 +53,8 @@ describe('SecurityHuksDerivePBKDF2BasicAbort63KBPromiseJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
abort
'
);
let
deriveArray
=
new
Array
(
HuksDerivePBKDF2
.
HuksKeyAlgPBKDF2
,
HuksDerivePBKDF2
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
abort
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_reformed_test/huks_derive_promise_BasicTest/src/main/js/test/Derive/SecurityHuksDerivePBKDF2BasicFinish63KBPromiseJsunit.test.js
浏览文件 @
26cd889d
...
@@ -54,7 +54,8 @@ describe('SecurityHuksDerivePBKDF2BasicFinish63KBPromiseJsunit', function () {
...
@@ -54,7 +54,8 @@ describe('SecurityHuksDerivePBKDF2BasicFinish63KBPromiseJsunit', function () {
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
'
finish
'
);
let
deriveArray
=
new
Array
(
HuksDerivePBKDF2
.
HuksKeyAlgPBKDF2
,
HuksDerivePBKDF2
.
HuksKeyDERIVEKEYSIZE
);
await
publicDeriveFunc
(
srcKeyAliesFirst
,
HuksOptions63kb
,
huksOptionsFinish
,
deriveArray
,
'
finish
'
);
done
();
done
();
});
});
});
});
...
...
security/security_huks_reformed_test/utils/param/derive/publicDeriveCallback.js
浏览文件 @
26cd889d
...
@@ -221,18 +221,20 @@ function deleteKeyItem(srcKeyAlies, HuksOptions) {
...
@@ -221,18 +221,20 @@ function deleteKeyItem(srcKeyAlies, HuksOptions) {
});
});
}
}
async
function
publicDeriveFunc
(
srcKeyAlies
,
HuksOptions
,
huksOptionsFinish
,
thirdInderfaceName
)
{
async
function
publicDeriveFunc
(
srcKeyAlies
,
HuksOptions
,
huksOptionsFinish
,
deriveArray
,
thirdInderfaceName
)
{
try
{
try
{
await
publicDeriveGenFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveGenFunc
(
srcKeyAlies
,
HuksOptions
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyAlgHKDF
);
let
deriveArrAlg
=
HuksOptions
.
properties
[
0
];
HuksOptions
.
properties
.
splice
(
3
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
let
deriveArrLen
=
HuksOptions
.
properties
[
3
];
HuksOptions
.
properties
.
splice
(
0
,
1
,
deriveArray
[
0
]);
HuksOptions
.
properties
.
splice
(
3
,
1
,
deriveArray
[
1
]);
await
publicDeriveInitFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveInitFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveUpdateFunc
(
HuksOptions
);
await
publicDeriveUpdateFunc
(
HuksOptions
);
await
publicDeriveFinishAbortFunc
(
huksOptionsFinish
,
thirdInderfaceName
);
await
publicDeriveFinishAbortFunc
(
huksOptionsFinish
,
thirdInderfaceName
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyAlgAES
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
deriveArrAlg
);
HuksOptions
.
properties
.
splice
(
3
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyHKDFSize128
);
HuksOptions
.
properties
.
splice
(
3
,
1
,
deriveArrLen
);
await
publicDeriveDeleteFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveDeleteFunc
(
srcKeyAlies
,
HuksOptions
);
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
...
...
security/security_huks_reformed_test/utils/param/derive/publicDerivePromise.js
浏览文件 @
26cd889d
...
@@ -124,18 +124,20 @@ async function publicDeriveDeleteFunc(srcKeyAlies, HuksOptions) {
...
@@ -124,18 +124,20 @@ async function publicDeriveDeleteFunc(srcKeyAlies, HuksOptions) {
}
}
}
}
async
function
publicDeriveFunc
(
srcKeyAlies
,
HuksOptions
,
huksOptionsFinish
,
thirdInderfaceName
)
{
async
function
publicDeriveFunc
(
srcKeyAlies
,
HuksOptions
,
huksOptionsFinish
,
deriveArray
,
thirdInderfaceName
)
{
try
{
try
{
await
publicDeriveGenFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveGenFunc
(
srcKeyAlies
,
HuksOptions
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyAlgHKDF
);
let
deriveArrAlg
=
HuksOptions
.
properties
[
0
];
HuksOptions
.
properties
.
splice
(
3
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyDERIVEKEYSIZE
);
let
deriveArrLen
=
HuksOptions
.
properties
[
3
];
HuksOptions
.
properties
.
splice
(
0
,
1
,
deriveArray
[
0
]);
HuksOptions
.
properties
.
splice
(
3
,
1
,
deriveArray
[
1
]);
await
publicDeriveInitFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveInitFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveUpdateFunc
(
HuksOptions
);
await
publicDeriveUpdateFunc
(
HuksOptions
);
await
publicDeriveFinishAbortFunc
(
huksOptionsFinish
,
thirdInderfaceName
);
await
publicDeriveFinishAbortFunc
(
huksOptionsFinish
,
thirdInderfaceName
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyAlgAES
);
HuksOptions
.
properties
.
splice
(
0
,
1
,
deriveArrAlg
);
HuksOptions
.
properties
.
splice
(
3
,
1
,
paramPublic
.
HuksDeriveHKDF
.
HuksKeyHKDFSize128
);
HuksOptions
.
properties
.
splice
(
3
,
1
,
deriveArrLen
);
await
publicDeriveDeleteFunc
(
srcKeyAlies
,
HuksOptions
);
await
publicDeriveDeleteFunc
(
srcKeyAlies
,
HuksOptions
);
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录