Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c5dfb00a
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看板
未验证
提交
c5dfb00a
编写于
5月 06, 2022
作者:
O
openharmony_ci
提交者:
Gitee
5月 06, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3112 hukscode basic代码verify规格修改
Merge pull request !3112 from 胡吉翔/security_20220505_2
上级
171db7eb
fa63ac02
变更
30
显示空白变更内容
内联
并排
Showing
30 changed file
with
189 addition
and
176 deletion
+189
-176
security/security_huks_basic/huks_cipher_callback_BasicTest/entry/src/main/js/test/Cipher/SecurityHuksAESBasicCallbackJsunit.test.js
...js/test/Cipher/SecurityHuksAESBasicCallbackJsunit.test.js
+2
-9
security/security_huks_basic/huks_cipher_promise_BasicTest/entry/src/main/js/test/Cipher/SecurityHuksCipherAESBasicPromiseJsunit.test.js
...st/Cipher/SecurityHuksCipherAESBasicPromiseJsunit.test.js
+2
-8
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicAbort63KBCallbackJsunit.test.js
...erify/SecurityHuksDSABasicAbort63KBCallbackJsunit.test.js
+2
-1
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicAbort65KBCallbackJsunit.test.js
...erify/SecurityHuksDSABasicAbort65KBCallbackJsunit.test.js
+2
-1
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicFinish63KBCallbackJsunit.test.js
...rify/SecurityHuksDSABasicFinish63KBCallbackJsunit.test.js
+7
-4
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicFinish65KBCallbackJsunit.test.js
...rify/SecurityHuksDSABasicFinish65KBCallbackJsunit.test.js
+7
-4
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicAbort63KBCallbackJsunit.test.js
...erify/SecurityHuksECCBasicAbort63KBCallbackJsunit.test.js
+2
-1
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicAbort65KBCallbackJsunit.test.js
...erify/SecurityHuksECCBasicAbort65KBCallbackJsunit.test.js
+2
-1
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicFinish63KBCallbackJsunit.test.js
...rify/SecurityHuksECCBasicFinish63KBCallbackJsunit.test.js
+7
-4
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicFinish65KBCallbackJsunit.test.js
...rify/SecurityHuksECCBasicFinish65KBCallbackJsunit.test.js
+7
-4
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksED25519BasicCallbackJsunit.test.js
...SignVerify/SecurityHuksED25519BasicCallbackJsunit.test.js
+17
-10
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicAbort63KBCallbackJsunit.test.js
...erify/SecurityHuksRSABasicAbort63KBCallbackJsunit.test.js
+2
-1
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicAbort65KBCallbackJsunit.test.js
...erify/SecurityHuksRSABasicAbort65KBCallbackJsunit.test.js
+2
-1
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicFinish63KBCallbackJsunit.test.js
...rify/SecurityHuksRSABasicFinish63KBCallbackJsunit.test.js
+7
-4
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicFinish65KBCallbackJsunit.test.js
...rify/SecurityHuksRSABasicFinish65KBCallbackJsunit.test.js
+7
-4
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicAbort63KBPromiseJsunit.test.js
...Verify/SecurityHuksDSABasicAbort63KBPromiseJsunit.test.js
+4
-2
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicAbort65KBPromiseJsunit.test.js
...Verify/SecurityHuksDSABasicAbort65KBPromiseJsunit.test.js
+3
-1
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicFinish63KBPromiseJsunit.test.js
...erify/SecurityHuksDSABasicFinish63KBPromiseJsunit.test.js
+7
-4
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicFinish65KBPromiseJsunit.test.js
...erify/SecurityHuksDSABasicFinish65KBPromiseJsunit.test.js
+7
-4
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicAbort63KBPromiseJsunit.test.js
...Verify/SecurityHuksECCBasicAbort63KBPromiseJsunit.test.js
+2
-1
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicAbort65KBPromiseJsunit.test.js
...Verify/SecurityHuksECCBasicAbort65KBPromiseJsunit.test.js
+2
-1
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicFinish63KBPromiseJsunit.test.js
...erify/SecurityHuksECCBasicFinish63KBPromiseJsunit.test.js
+7
-4
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicFinish65KBPromiseJsunit.test.js
...erify/SecurityHuksECCBasicFinish65KBPromiseJsunit.test.js
+7
-4
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksED25519BasicPromiseJsunit.test.js
.../SignVerify/SecurityHuksED25519BasicPromiseJsunit.test.js
+17
-10
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicAbort63KBPromiseJsunit.test.js
...Verify/SecurityHuksRSABasicAbort63KBPromiseJsunit.test.js
+2
-1
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicAbort65KBPromiseJsunit.test.js
...Verify/SecurityHuksRSABasicAbort65KBPromiseJsunit.test.js
+2
-1
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicFinish63KBPromiseJsunit.test.js
...erify/SecurityHuksRSABasicFinish63KBPromiseJsunit.test.js
+7
-4
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicFinish65KBPromiseJsunit.test.js
...erify/SecurityHuksRSABasicFinish65KBPromiseJsunit.test.js
+7
-4
security/security_huks_basic/utils/param/signverify/publicSignverifyCallback.js
..._basic/utils/param/signverify/publicSignverifyCallback.js
+20
-39
security/security_huks_basic/utils/param/signverify/publicSignverifyPromise.js
...s_basic/utils/param/signverify/publicSignverifyPromise.js
+20
-39
未找到文件。
security/security_huks_basic/huks_cipher_callback_BasicTest/entry/src/main/js/test/Cipher/SecurityHuksAESBasicCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -96,7 +96,6 @@ async function publicUpdateFunc(HuksOptions, thirdInderfaceName, isEncrypt) {
let
inDataArray
=
HuksOptions
.
inData
;
if
(
Array
.
from
(
inDataArray
).
length
<
dateSize
)
{
await
update
(
handle
,
HuksOptions
);
// HuksOptions.inData = new Uint8Array(new Array());
await
publicFinishAbortFunc
(
HuksOptions
,
thirdInderfaceName
,
isEncrypt
,
0
);
}
else
{
let
count
=
Math
.
floor
(
Array
.
from
(
inDataArray
).
length
/
dateSize
);
...
...
@@ -116,12 +115,7 @@ async function publicUpdateFunc(HuksOptions, thirdInderfaceName, isEncrypt) {
)
);
}
await
publicFinishAbortFunc
(
HuksOptions
,
thirdInderfaceName
,
isEncrypt
,
remainder
);
await
publicFinishAbortFunc
(
HuksOptions
,
thirdInderfaceName
,
isEncrypt
);
}
}
...
...
@@ -158,8 +152,7 @@ function updateCallback(handle, HuksOptions) {
async
function
publicFinishAbortFunc
(
HuksOptions
,
thirdInderfaceName
,
isEncrypt
,
remainder
isEncrypt
)
{
if
(
thirdInderfaceName
==
'
finish
'
)
{
await
finish
(
HuksOptions
,
isEncrypt
);
...
...
security/security_huks_basic/huks_cipher_promise_BasicTest/entry/src/main/js/test/Cipher/SecurityHuksCipherAESBasicPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -92,12 +92,7 @@ async function publicUpdateFunc(HuksOptions, thirdInderfaceName, isEncrypt) {
}
else
{
HuksOptions
.
inData
=
new
Uint8Array
(
new
Array
());
}
await
publicFinishAbortFunc
(
HuksOptions
,
thirdInderfaceName
,
isEncrypt
,
remainder
);
await
publicFinishAbortFunc
(
HuksOptions
,
thirdInderfaceName
,
isEncrypt
);
}
}
...
...
@@ -124,8 +119,7 @@ async function update(handle, HuksOptions) {
async
function
publicFinishAbortFunc
(
HuksOptions
,
thirdInderfaceName
,
isEncrypt
,
remainder
isEncrypt
)
{
if
(
thirdInderfaceName
==
'
finish
'
)
{
await
finish
(
HuksOptions
,
isEncrypt
);
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicAbort63KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -36,7 +36,8 @@ describe('SecurityHuksSignVerifyDSACallbackJsunit', function () {
NewSrcKeyAlies
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicAbort65KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -37,7 +37,8 @@ describe('SecurityHuksSignVerifyDSACallbackJsunit', function () {
NewSrcKeyAlies
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicFinish63KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData63
=
Data
.
Data63b
;
let
srcData63Kb
=
stringToUint8Array
(
srcData63
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyDSACallbackJsunit
'
,
function
()
{
it
(
'
testSignVerifyDSA001
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyDSASIGNSHA1KeyAlias001
'
;
...
...
@@ -31,12 +32,13 @@ describe('SecurityHuksSignVerifyDSACallbackJsunit', function () {
),
inData
:
srcData63Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
newSrcKeyAlies
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData63Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -45,14 +47,15 @@ describe('SecurityHuksSignVerifyDSACallbackJsunit', function () {
HuksSignVerifyDSA
.
HuksTagDSADigestSHA1
,
HuksSignVerifyDSA
.
HuksTagDSACOMMONSIZE
),
inData
:
srcData63Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
newSrcKeyAlies
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicFinish65KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData65
=
Data
.
Data65b
;
let
srcData65Kb
=
stringToUint8Array
(
srcData65
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyDSACallbackJsunit
'
,
function
()
{
it
(
'
testSignVerifyDSA003
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyDSASIGNSHA1KeyAlias003
'
;
...
...
@@ -31,12 +32,13 @@ describe('SecurityHuksSignVerifyDSACallbackJsunit', function () {
),
inData
:
srcData65Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
newSrcKeyAlies
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData65Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -45,14 +47,15 @@ describe('SecurityHuksSignVerifyDSACallbackJsunit', function () {
HuksSignVerifyDSA
.
HuksTagDSADigestSHA1
,
HuksSignVerifyDSA
.
HuksKeySIZE1024
),
inData
:
srcData65Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
newSrcKeyAlies
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicAbort63KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -36,7 +36,8 @@ describe('SecurityHuksSignVerifyECCCallbackJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicAbort65KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -36,7 +36,8 @@ describe('SecurityHuksSignVerifyECCCallbackJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicFinish63KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData63
=
Data
.
Data63b
;
let
srcData63Kb
=
stringToUint8Array
(
srcData63
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyECCCallbackJsunit
'
,
function
()
{
it
(
'
testSignVerifyECC001
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyECCSize224SIGNNONEKeyAlias001
'
;
...
...
@@ -31,12 +32,13 @@ describe('SecurityHuksSignVerifyECCCallbackJsunit', function () {
),
inData
:
srcData63Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData63Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -45,14 +47,15 @@ describe('SecurityHuksSignVerifyECCCallbackJsunit', function () {
HuksSignVerifyECC
.
HuksTagECCDigestNONE
,
HuksSignVerifyECC
.
HuksKeyECCSize224
),
inData
:
srcData63Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicFinish65KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData65
=
Data
.
Data65b
;
let
srcData65Kb
=
stringToUint8Array
(
srcData65
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyECCCallbackJsunit
'
,
function
()
{
it
(
'
testSignVerifyECC003
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyECCSize224SIGNNONEKeyAlias003
'
;
...
...
@@ -31,12 +32,13 @@ describe('SecurityHuksSignVerifyECCCallbackJsunit', function () {
),
inData
:
srcData65Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData65Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -45,14 +47,15 @@ describe('SecurityHuksSignVerifyECCCallbackJsunit', function () {
HuksSignVerifyECC
.
HuksTagECCDigestNONE
,
HuksSignVerifyECC
.
HuksKeyECCSize224
),
inData
:
srcData65Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksED25519BasicCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -21,6 +21,7 @@ let srcData63 = Data.Data63b;
let
srcData63Kb
=
stringToUint8Array
(
srcData63
);
let
srcData65
=
Data
.
Data65b
;
let
srcData65Kb
=
stringToUint8Array
(
srcData65
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyED25519CallbackJsunit
'
,
function
()
{
it
(
'
testSignVerifyED25519001
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyED25519Size256SIGNKeyAlias001
'
;
...
...
@@ -33,12 +34,13 @@ describe('SecurityHuksSignVerifyED25519CallbackJsunit', function () {
),
inData
:
srcData63Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData63Kb
);
HuksOptions
=
{
...
...
@@ -48,14 +50,15 @@ describe('SecurityHuksSignVerifyED25519CallbackJsunit', function () {
HuksSignVerifyED25519
.
HuksKeyED25519Size256
,
HuksSignVerifyED25519
.
HuksTagDigestSHA1
),
inData
:
srcData63Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData63Kb
);
done
();
});
...
...
@@ -76,7 +79,8 @@ describe('SecurityHuksSignVerifyED25519CallbackJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData63Kb
);
done
();
});
...
...
@@ -92,12 +96,13 @@ describe('SecurityHuksSignVerifyED25519CallbackJsunit', function () {
),
inData
:
srcData65Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData65Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -106,14 +111,15 @@ describe('SecurityHuksSignVerifyED25519CallbackJsunit', function () {
HuksSignVerifyED25519
.
HuksKeyED25519Size256
,
HuksSignVerifyED25519
.
HuksTagDigestSHA1
),
inData
:
srcData65Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData65Kb
);
done
();
});
...
...
@@ -134,7 +140,8 @@ describe('SecurityHuksSignVerifyED25519CallbackJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicAbort63KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -40,7 +40,8 @@ describe('SecurityHuksSignVerifyRSACallbackJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicAbort65KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -37,7 +37,8 @@ describe('SecurityHuksSignVerifyRSACallbackJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicFinish63KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData63
=
Data
.
Data63b
;
let
srcData63Kb
=
stringToUint8Array
(
srcData63
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyRSACallbackJsunit
'
,
function
()
{
it
(
'
testSignVerifyRSA001
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyRSASize512SIGNPKCS1MD5KeyAlias001
'
;
...
...
@@ -32,12 +33,13 @@ describe('SecurityHuksSignVerifyRSACallbackJsunit', function () {
),
inData
:
srcData63Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData63Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -47,14 +49,15 @@ describe('SecurityHuksSignVerifyRSACallbackJsunit', function () {
HuksSignVerifyRSA
.
HuksKeyRSAPADDINGPKCS1V15
,
HuksSignVerifyRSA
.
HuksKeyRSASize512
),
inData
:
srcData63Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicFinish65KBCallbackJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData65
=
Data
.
Data65b
;
let
srcData65Kb
=
stringToUint8Array
(
srcData65
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyRSACallbackJsunit
'
,
function
()
{
it
(
'
testSignVerifyRSA003
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyRSASize512SIGNPKCS1MD5KeyAlias003
'
;
...
...
@@ -32,12 +33,13 @@ describe('SecurityHuksSignVerifyRSACallbackJsunit', function () {
),
inData
:
srcData65Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData65Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -47,14 +49,15 @@ describe('SecurityHuksSignVerifyRSACallbackJsunit', function () {
HuksSignVerifyRSA
.
HuksKeyRSAPADDINGPKCS1V15
,
HuksSignVerifyRSA
.
HuksKeyRSASize512
),
inData
:
srcData65Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
false
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicAbort63KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData63
=
Data
.
Data63b
;
let
srcData63Kb
=
stringToUint8Array
(
srcData63
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyDSAPromiseJsunit
'
,
function
()
{
it
(
'
testSignVerifyDSA102
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyDSASIGNSHA1KeyAlias102
'
;
...
...
@@ -31,12 +32,13 @@ describe('SecurityHuksSignVerifyDSAPromiseJsunit', function () {
),
inData
:
srcData63Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
NewSrcKeyAlies
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicAbort65KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData65
=
Data
.
Data65b
;
let
srcData65Kb
=
stringToUint8Array
(
srcData65
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyDSAPromiseJsunit
'
,
function
()
{
it
(
'
testSignVerifyDSA104
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyDSASIGNSHA1KeyAlias104
'
;
...
...
@@ -36,7 +37,8 @@ describe('SecurityHuksSignVerifyDSAPromiseJsunit', function () {
NewSrcKeyAlies
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicFinish63KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData63
=
Data
.
Data63b
;
let
srcData63Kb
=
stringToUint8Array
(
srcData63
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyDSAPromiseJsunit
'
,
function
()
{
it
(
'
testSignVerifyDSA101
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyDSASIGNSHA1KeyAlias101
'
;
...
...
@@ -31,12 +32,13 @@ describe('SecurityHuksSignVerifyDSAPromiseJsunit', function () {
),
inData
:
srcData63Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
newSrcKeyAlies
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData63Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -45,14 +47,15 @@ describe('SecurityHuksSignVerifyDSAPromiseJsunit', function () {
HuksSignVerifyDSA
.
HuksTagDSADigestSHA1
,
HuksSignVerifyDSA
.
HuksTagDSACOMMONSIZE
),
inData
:
srcData63Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
newSrcKeyAlies
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksDSABasicFinish65KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData65
=
Data
.
Data65b
;
let
srcData65Kb
=
stringToUint8Array
(
srcData65
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyDSAPromiseJsunit
'
,
function
()
{
it
(
'
testSignVerifyDSA103
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyDSASIGNSHA1KeyAlias103
'
;
...
...
@@ -31,12 +32,13 @@ describe('SecurityHuksSignVerifyDSAPromiseJsunit', function () {
),
inData
:
srcData65Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
newSrcKeyAlies
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData65Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -45,14 +47,15 @@ describe('SecurityHuksSignVerifyDSAPromiseJsunit', function () {
HuksSignVerifyDSA
.
HuksTagDSADigestSHA1
,
HuksSignVerifyDSA
.
HuksKeySIZE1024
),
inData
:
srcData65Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
newSrcKeyAlies
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicAbort63KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -36,7 +36,8 @@ describe('SecurityHuksSignVerifyECCPromiseJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicAbort65KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -36,7 +36,8 @@ describe('SecurityHuksSignVerifyECCPromiseJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicFinish63KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData63
=
Data
.
Data63b
;
let
srcData63Kb
=
stringToUint8Array
(
srcData63
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyECCPromiseJsunit
'
,
function
()
{
it
(
'
testSignVerifyECC101
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyECCSize224SIGNNONEKeyAlias101
'
;
...
...
@@ -31,12 +32,13 @@ describe('SecurityHuksSignVerifyECCPromiseJsunit', function () {
),
inData
:
srcData63Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData63Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -45,14 +47,15 @@ describe('SecurityHuksSignVerifyECCPromiseJsunit', function () {
HuksSignVerifyECC
.
HuksTagECCDigestNONE
,
HuksSignVerifyECC
.
HuksKeyECCSize224
),
inData
:
srcData63Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksECCBasicFinish65KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData65
=
Data
.
Data65b
;
let
srcData65Kb
=
stringToUint8Array
(
srcData65
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyECCPromiseJsunit
'
,
function
()
{
it
(
'
testSignVerifyECC103
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyECCSize224SIGNNONEKeyAlias103
'
;
...
...
@@ -31,12 +32,13 @@ describe('SecurityHuksSignVerifyECCPromiseJsunit', function () {
),
inData
:
srcData65Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData65Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -45,14 +47,15 @@ describe('SecurityHuksSignVerifyECCPromiseJsunit', function () {
HuksSignVerifyECC
.
HuksTagECCDigestNONE
,
HuksSignVerifyECC
.
HuksKeyECCSize224
),
inData
:
srcData65Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksED25519BasicPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -21,6 +21,7 @@ let srcData63 = Data.Data63b;
let
srcData63Kb
=
stringToUint8Array
(
srcData63
);
let
srcData65
=
Data
.
Data65b
;
let
srcData65Kb
=
stringToUint8Array
(
srcData65
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyED25519PromiseJsunit
'
,
function
()
{
it
(
'
testSignVerifyED25519101
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyED25519Size256SIGNKeyAlias101
'
;
...
...
@@ -33,12 +34,13 @@ describe('SecurityHuksSignVerifyED25519PromiseJsunit', function () {
),
inData
:
srcData63Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData63Kb
);
HuksOptions
=
{
...
...
@@ -48,14 +50,15 @@ describe('SecurityHuksSignVerifyED25519PromiseJsunit', function () {
HuksSignVerifyED25519
.
HuksKeyED25519Size256
,
HuksSignVerifyED25519
.
HuksTagDigestSHA1
),
inData
:
srcData63Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData63Kb
);
done
();
});
...
...
@@ -76,7 +79,8 @@ describe('SecurityHuksSignVerifyED25519PromiseJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData63Kb
);
done
();
});
...
...
@@ -92,12 +96,13 @@ describe('SecurityHuksSignVerifyED25519PromiseJsunit', function () {
),
inData
:
srcData65Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData65Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -106,14 +111,15 @@ describe('SecurityHuksSignVerifyED25519PromiseJsunit', function () {
HuksSignVerifyED25519
.
HuksKeyED25519Size256
,
HuksSignVerifyED25519
.
HuksTagDigestSHA1
),
inData
:
srcData65Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData65Kb
);
done
();
});
...
...
@@ -134,7 +140,8 @@ describe('SecurityHuksSignVerifyED25519PromiseJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicAbort63KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -37,7 +37,8 @@ describe('SecurityHuksSignVerifyRSAPromiseJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicAbort65KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -38,7 +38,8 @@ describe('SecurityHuksSignVerifyRSAPromiseJsunit', function () {
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
abort
'
,
true
true
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicFinish63KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData63
=
Data
.
Data63b
;
let
srcData63Kb
=
stringToUint8Array
(
srcData63
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyRSAPromiseJsunit
'
,
function
()
{
it
(
'
testSignVerifyRSA101
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyRSASize512SIGNPKCS1MD5KeyAlias101
'
;
...
...
@@ -32,12 +33,13 @@ describe('SecurityHuksSignVerifyRSAPromiseJsunit', function () {
),
inData
:
srcData63Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData63Kb
);
HuksOptions
=
{
properties
:
new
Array
(
...
...
@@ -47,14 +49,15 @@ describe('SecurityHuksSignVerifyRSAPromiseJsunit', function () {
HuksSignVerifyRSA
.
HuksKeyRSAPADDINGPKCS1V15
,
HuksSignVerifyRSA
.
HuksKeyRSASize512
),
inData
:
srcData63Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
false
false
,
srcData63Kb
);
done
();
});
...
...
security/security_huks_basic/huks_signverify_promise_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksRSABasicFinish65KBPromiseJsunit.test.js
浏览文件 @
c5dfb00a
...
...
@@ -19,6 +19,7 @@ import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'
import
{
publicSignVerifyFunc
}
from
'
../../../../../../../utils/param/signverify/publicSignverifyPromise.js
'
;
let
srcData65
=
Data
.
Data65b
;
let
srcData65Kb
=
stringToUint8Array
(
srcData65
);
let
finishOutData
;
describe
(
'
SecurityHuksSignVerifyRSAPromiseJsunit
'
,
function
()
{
it
(
'
testSignVerifyRSA103
'
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testSignVerifyRSASize512SIGNPKCS1MD5KeyAlias103
'
;
...
...
@@ -32,12 +33,13 @@ describe('SecurityHuksSignVerifyRSAPromiseJsunit', function () {
),
inData
:
srcData65Kb
,
};
await
publicSignVerifyFunc
(
finishOutData
=
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
true
,
srcData65Kb
);
HuksOptions
=
{
...
...
@@ -48,14 +50,15 @@ describe('SecurityHuksSignVerifyRSAPromiseJsunit', function () {
HuksSignVerifyRSA
.
HuksKeyRSAPADDINGPKCS1V15
,
HuksSignVerifyRSA
.
HuksKeyRSASize512
),
inData
:
srcData65Kb
,
inData
:
finishOutData
,
};
await
publicSignVerifyFunc
(
srcKeyAlies
,
srcKeyAlies
+
'
New
'
,
HuksOptions
,
'
finish
'
,
true
false
,
srcData65Kb
);
done
();
});
...
...
security/security_huks_basic/utils/param/signverify/publicSignverifyCallback.js
浏览文件 @
c5dfb00a
...
...
@@ -49,7 +49,7 @@ function generateKey(srcKeyAlies, HuksOptions) {
async
function
publicImportKey
(
keyAlias
,
HuksOptions
)
{
let
_InData
=
HuksOptions
.
inData
;
HuksOptions
.
inData
=
finishOutData
;
HuksOptions
.
inData
=
exportKey
;
await
importKey
(
keyAlias
,
HuksOptions
)
.
then
((
data
)
=>
{
console
.
log
(
`test ImportKey data:
${
JSON
.
stringify
(
data
)}
`
);
...
...
@@ -79,7 +79,7 @@ async function publicExportKey(keyAlias, HuksOptions) {
await
exportkey
(
keyAlias
,
HuksOptions
)
.
then
((
data
)
=>
{
console
.
log
(
`test exportKey data:
${
JSON
.
stringify
(
data
)}
`
);
finishOutData
=
data
.
outData
;
exportKey
=
data
.
outData
;
})
.
catch
((
err
)
=>
{
console
.
log
(
'
test exportKey err information:
'
+
JSON
.
stringify
(
err
));
...
...
@@ -127,13 +127,8 @@ function init(srcKeyAlies, HuksOptions) {
});
}
async
function
publicUpdateFunc
(
HuksOptions
,
isBigData
)
{
let
dateSize
=
0
;
if
(
isBigData
)
{
dateSize
=
64
*
1024
;
}
else
{
dateSize
=
64
;
}
async
function
publicUpdateFunc
(
HuksOptions
)
{
let
dateSize
=
64
;
let
tempHuksOptionsInData
=
HuksOptions
.
inData
;
let
inDataArray
=
HuksOptions
.
inData
;
if
(
uint8ArrayToString
(
inDataArray
).
length
<
dateSize
)
{
...
...
@@ -194,7 +189,7 @@ async function publicFinishFunc(HuksOptions) {
await
finish
(
handle
,
HuksOptions
)
.
then
((
data
)
=>
{
console
.
log
(
`test finish data:
${
JSON
.
stringify
(
data
)}
`
);
exportKey
=
data
.
outData
;
finishOutData
=
data
.
outData
;
expect
(
data
.
errorCode
==
0
).
assertTrue
();
})
.
catch
((
err
)
=>
{
...
...
@@ -272,66 +267,52 @@ async function publicSignVerifyFunc(
HuksOptions
,
thirdInderfaceName
,
isSING
,
isBig
Data
raw
Data
)
{
try
{
let
keyAlias
=
srcKeyAlies
;
let
purposeSignVerigy
=
HuksSignVerifyDSA
.
HuksKeyRSAPurposeSINGVERIFY
;
let
purposeSign
=
HuksSignVerifyDSA
.
HuksKeyDSAPurposeSIGN
;
let
PurposeVerify
=
HuksSignVerifyDSA
.
HuksKeyDSAPurposeVERIFY
;
if
(
isSING
)
{
HuksOptions
.
properties
.
splice
(
1
,
1
,
HuksSignVerifyDSA
.
HuksKeyRSAPurposeSINGVERIFY
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
purposeSignVerigy
);
if
(
HuksOptions
.
properties
[
0
].
value
==
HksKeyAlg
.
HKS_ALG_DSA
)
{
HuksOptions
.
properties
.
splice
(
2
,
0
,
HuksSignVerifyDSA
.
HuksKeySIZE1024
);
}
await
publicGenerateKeyFunc
(
keyAlias
,
HuksOptions
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
HuksSignVerifyDSA
.
HuksKeyDSAPurposeSIGN
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
purposeSign
);
if
(
HuksOptions
.
properties
[
0
].
value
==
HksKeyAlg
.
HKS_ALG_DSA
)
{
HuksOptions
.
properties
.
splice
(
2
,
1
);
}
}
else
{
keyAlias
=
newSrcKeyAlies
;
finishOutData
=
HuksOptions
.
inData
;
await
publicImportKey
(
keyAlias
,
HuksOptions
);
}
await
publicInitFunc
(
keyAlias
,
HuksOptions
);
await
publicUpdateFunc
(
HuksOptions
,
isBigData
);
HuksOptions
.
inData
=
rawData
;
await
publicUpdateFunc
(
HuksOptions
);
if
(
thirdInderfaceName
==
'
finish
'
)
{
if
(
isSING
)
{
HuksOptions
.
outData
=
new
Uint8Array
(
new
Array
(
1024
));
HuksOptions
.
inData
=
new
Uint8Array
(
new
Array
(
));
await
publicFinishFunc
(
HuksOptions
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
HuksSignVerifyDSA
.
HuksKeyRSAPurposeSINGVERIFY
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
purposeSignVerigy
);
await
publicExportKey
(
keyAlias
,
HuksOptions
);
}
else
{
HuksOptions
.
outData
=
exportKey
;
HuksOptions
.
inData
=
finishOutData
;
await
publicFinishFunc
(
HuksOptions
);
}
}
else
{
await
publicAbortFucn
(
HuksOptions
);
}
if
(
isSING
&&
thirdInderfaceName
==
'
abort
'
)
{
HuksOptions
.
properties
.
splice
(
1
,
1
,
HuksSignVerifyDSA
.
HuksKeyRSAPurposeSINGVERIFY
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
purposeSignVerigy
);
await
publicDeleteKeyFunc
(
srcKeyAlies
,
HuksOptions
);
}
else
if
(
!
isSING
)
{
HuksOptions
.
properties
.
splice
(
1
,
1
,
HuksSignVerifyDSA
.
HuksKeyDSAPurposeVERIFY
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
PurposeVerify
);
await
publicDeleteKeyFunc
(
newSrcKeyAlies
,
HuksOptions
);
}
return
finishOutData
;
}
catch
(
e
)
{
expect
(
null
).
assertFail
();
}
...
...
security/security_huks_basic/utils/param/signverify/publicSignverifyPromise.js
浏览文件 @
c5dfb00a
...
...
@@ -36,7 +36,7 @@ async function publicGenerateKeyFunc(keyAlias, HuksOptions) {
async
function
publicImportKey
(
keyAlias
,
HuksOptions
)
{
let
_InData
=
HuksOptions
.
inData
;
HuksOptions
.
inData
=
finishOutData
;
HuksOptions
.
inData
=
exportKey
;
await
huks
.
importKey
(
keyAlias
,
HuksOptions
)
.
then
((
data
)
=>
{
...
...
@@ -54,7 +54,7 @@ async function publicExportKey(keyAlias, HuksOptions) {
.
exportKey
(
keyAlias
,
HuksOptions
)
.
then
((
data
)
=>
{
console
.
log
(
`test exportKey data:
${
JSON
.
stringify
(
data
)}
`
);
finishOutData
=
data
.
outData
;
exportKey
=
data
.
outData
;
})
.
catch
((
err
)
=>
{
console
.
log
(
'
test exportKey err information:
'
+
JSON
.
stringify
(
err
));
...
...
@@ -76,13 +76,8 @@ async function publicInitFunc(keyAlias, HuksOptions) {
});
}
async
function
publicUpdateFunc
(
HuksOptions
,
isBigData
)
{
let
dateSize
=
0
;
if
(
isBigData
)
{
dateSize
=
64
*
1024
;
}
else
{
dateSize
=
64
;
}
async
function
publicUpdateFunc
(
HuksOptions
)
{
let
dateSize
=
64
;
let
tempHuksOptionsInData
=
HuksOptions
.
inData
;
let
inDataArray
=
HuksOptions
.
inData
;
if
(
uint8ArrayToString
(
inDataArray
).
length
<
dateSize
)
{
...
...
@@ -132,7 +127,7 @@ async function publicFinishFunc(HuksOptions) {
.
finish
(
handle
,
HuksOptions
)
.
then
((
data
)
=>
{
console
.
log
(
`test finish data:
${
JSON
.
stringify
(
data
)}
`
);
exportKey
=
data
.
outData
;
finishOutData
=
data
.
outData
;
expect
(
data
.
errorCode
==
0
).
assertTrue
();
})
.
catch
((
err
)
=>
{
...
...
@@ -173,66 +168,52 @@ async function publicSignVerifyFunc(
HuksOptions
,
thirdInderfaceName
,
isSING
,
isBig
Data
raw
Data
)
{
try
{
let
keyAlias
=
srcKeyAlies
;
let
purposeSignVerigy
=
HuksSignVerifyDSA
.
HuksKeyRSAPurposeSINGVERIFY
;
let
purposeSign
=
HuksSignVerifyDSA
.
HuksKeyDSAPurposeSIGN
;
let
PurposeVerify
=
HuksSignVerifyDSA
.
HuksKeyDSAPurposeVERIFY
;
if
(
isSING
)
{
HuksOptions
.
properties
.
splice
(
1
,
1
,
HuksSignVerifyDSA
.
HuksKeyRSAPurposeSINGVERIFY
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
purposeSignVerigy
);
if
(
HuksOptions
.
properties
[
0
].
value
==
HksKeyAlg
.
HKS_ALG_DSA
)
{
HuksOptions
.
properties
.
splice
(
2
,
0
,
HuksSignVerifyDSA
.
HuksKeySIZE1024
);
}
await
publicGenerateKeyFunc
(
keyAlias
,
HuksOptions
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
HuksSignVerifyDSA
.
HuksKeyDSAPurposeSIGN
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
purposeSign
);
if
(
HuksOptions
.
properties
[
0
].
value
==
HksKeyAlg
.
HKS_ALG_DSA
)
{
HuksOptions
.
properties
.
splice
(
2
,
1
);
}
}
else
{
keyAlias
=
newSrcKeyAlies
;
finishOutData
=
HuksOptions
.
inData
;
await
publicImportKey
(
keyAlias
,
HuksOptions
);
}
await
publicInitFunc
(
keyAlias
,
HuksOptions
);
await
publicUpdateFunc
(
HuksOptions
,
isBigData
);
HuksOptions
.
inData
=
rawData
;
await
publicUpdateFunc
(
HuksOptions
);
if
(
thirdInderfaceName
==
'
finish
'
)
{
if
(
isSING
)
{
HuksOptions
.
outData
=
new
Uint8Array
(
new
Array
(
1024
).
fill
(
''
));
HuksOptions
.
inData
=
new
Uint8Array
(
new
Array
(
));
await
publicFinishFunc
(
HuksOptions
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
HuksSignVerifyDSA
.
HuksKeyRSAPurposeSINGVERIFY
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
purposeSignVerigy
);
await
publicExportKey
(
keyAlias
,
HuksOptions
);
}
else
{
HuksOptions
.
outData
=
exportKey
;
HuksOptions
.
inData
=
finishOutData
;
await
publicFinishFunc
(
HuksOptions
);
}
}
else
{
await
publicAbortFucn
(
HuksOptions
);
}
if
(
isSING
&&
thirdInderfaceName
==
'
abort
'
)
{
HuksOptions
.
properties
.
splice
(
1
,
1
,
HuksSignVerifyDSA
.
HuksKeyRSAPurposeSINGVERIFY
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
purposeSignVerigy
);
await
publicDeleteKeyFunc
(
srcKeyAlies
,
HuksOptions
);
}
else
if
(
!
isSING
)
{
HuksOptions
.
properties
.
splice
(
1
,
1
,
HuksSignVerifyDSA
.
HuksKeyDSAPurposeVERIFY
);
HuksOptions
.
properties
.
splice
(
1
,
1
,
PurposeVerify
);
await
publicDeleteKeyFunc
(
newSrcKeyAlies
,
HuksOptions
);
}
return
finishOutData
;
}
catch
(
e
)
{
expect
(
null
).
assertFail
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录