Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
483ffc59
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看板
提交
483ffc59
编写于
8月 31, 2022
作者:
Q
Qwink2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify huks case number
Signed-off-by:
N
Qwink2016
<
714794360@qq.com
>
上级
43da29a8
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
1556 addition
and
2087 deletion
+1556
-2087
security/security_huks_basic/huks_hmac_callback_BasicTest/src/main/js/test/HMAC/SecurityHuksAccessControlJsunit.test.js
...main/js/test/HMAC/SecurityHuksAccessControlJsunit.test.js
+2
-0
security/security_huks_basic/huks_hmac_callback_BasicTest/src/main/js/test/HMAC/SecurityHuksHmacBasicCallbackJsunit.test.js
.../js/test/HMAC/SecurityHuksHmacBasicCallbackJsunit.test.js
+142
-174
security/security_huks_basic/huks_hmac_callback_BasicTest/src/main/js/test/List.test.js
...uks_hmac_callback_BasicTest/src/main/js/test/List.test.js
+6
-7
security/security_huks_basic/huks_hmac_promise_BasicTest/src/main/js/test/HMAC/SecurityHuksFaceFingerNormalJsunit.test.js
...n/js/test/HMAC/SecurityHuksFaceFingerNormalJsunit.test.js
+1275
-1801
security/security_huks_basic/huks_hmac_promise_BasicTest/src/main/js/test/HMAC/SecurityHuksHmacBasicPromiseJsunit.test.js
...n/js/test/HMAC/SecurityHuksHmacBasicPromiseJsunit.test.js
+131
-105
未找到文件。
security/security_huks_basic/huks_hmac_callback_BasicTest/src/main/js/test/HMAC/SecurityHuksAccessControlJsunit.test.js
浏览文件 @
483ffc59
...
@@ -854,6 +854,8 @@ export function SecurityHuksAccessControlJsunit() {
...
@@ -854,6 +854,8 @@ export function SecurityHuksAccessControlJsunit() {
expect
(
1342197283
).
assertEqual
(
expect
(
1342197283
).
assertEqual
(
huks
.
HuksTag
.
HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA
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
();
done
();
});
});
});
});
...
...
security/security_huks_basic/huks_hmac_callback_BasicTest/src/main/js/test/HMAC/SecurityHuksHmacBasicCallbackJsunit.test.js
浏览文件 @
483ffc59
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
{
describe
,
it
,
expect
}
from
'
@ohos/hypium
'
;
import
{
describe
,
it
,
expect
}
from
"
@ohos/hypium
"
;
import
huks
from
'
@ohos.security.huks
'
;
import
huks
from
"
@ohos.security.huks
"
;
import
Data
from
'
../../../../../../utils/data.json
'
;
import
Data
from
"
../../../../../../utils/data.json
"
;
import
{
HuksHmac
}
from
'
../../../../../../utils/param/hmac/publicHmacParam.js
'
;
import
{
HuksHmac
}
from
"
../../../../../../utils/param/hmac/publicHmacParam.js
"
;
import
{
stringToArray
}
from
'
../../../../../../utils/param/publicFunc.js
'
;
import
{
stringToArray
}
from
"
../../../../../../utils/param/publicFunc.js
"
;
var
handle
;
var
handle
;
let
srcData63Kb
=
Data
.
Date63KB
;
let
srcData63Kb
=
Data
.
Date63KB
;
...
@@ -28,13 +28,15 @@ function generateKey(srcKeyAlies, HuksOptions) {
...
@@ -28,13 +28,15 @@ function generateKey(srcKeyAlies, HuksOptions) {
huks
.
generateKey
(
srcKeyAlies
,
HuksOptions
,
function
(
err
,
data
)
{
huks
.
generateKey
(
srcKeyAlies
,
HuksOptions
,
function
(
err
,
data
)
{
try
{
try
{
if
(
err
.
code
!==
0
)
{
if
(
err
.
code
!==
0
)
{
console
.
log
(
'
test generateKey err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test generateKey err information:
"
+
JSON
.
stringify
(
err
)
);
reject
(
err
);
reject
(
err
);
}
else
{
}
else
{
resolve
(
data
);
resolve
(
data
);
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
'
test generateKey err information:
'
+
JSON
.
stringify
(
e
));
console
.
log
(
"
test generateKey err information:
"
+
JSON
.
stringify
(
e
));
reject
(
e
);
reject
(
e
);
}
}
});
});
...
@@ -46,14 +48,14 @@ function init(srcKeyAlies, HuksOptions) {
...
@@ -46,14 +48,14 @@ function init(srcKeyAlies, HuksOptions) {
huks
.
init
(
srcKeyAlies
,
HuksOptions
,
function
(
err
,
data
)
{
huks
.
init
(
srcKeyAlies
,
HuksOptions
,
function
(
err
,
data
)
{
try
{
try
{
if
(
err
.
code
!==
0
)
{
if
(
err
.
code
!==
0
)
{
console
.
log
(
'
test init err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test init err information:
"
+
JSON
.
stringify
(
err
));
reject
(
err
);
reject
(
err
);
}
else
{
}
else
{
handle
=
data
.
handle
;
handle
=
data
.
handle
;
resolve
(
data
);
resolve
(
data
);
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
'
test init err information:
'
+
JSON
.
stringify
(
e
));
console
.
log
(
"
test init err information:
"
+
JSON
.
stringify
(
e
));
reject
(
e
);
reject
(
e
);
}
}
});
});
...
@@ -65,13 +67,13 @@ function update(handle, HuksOptions) {
...
@@ -65,13 +67,13 @@ function update(handle, HuksOptions) {
huks
.
update
(
handle
,
HuksOptions
,
function
(
err
,
data
)
{
huks
.
update
(
handle
,
HuksOptions
,
function
(
err
,
data
)
{
try
{
try
{
if
(
err
.
code
!==
0
)
{
if
(
err
.
code
!==
0
)
{
console
.
log
(
'
test update err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test update err information:
"
+
JSON
.
stringify
(
err
));
reject
(
err
);
reject
(
err
);
}
else
{
}
else
{
resolve
(
data
);
resolve
(
data
);
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
'
test update err information:
'
+
JSON
.
stringify
(
e
));
console
.
log
(
"
test update err information:
"
+
JSON
.
stringify
(
e
));
reject
(
e
);
reject
(
e
);
}
}
});
});
...
@@ -83,13 +85,13 @@ function finish(handle, HuksOptions) {
...
@@ -83,13 +85,13 @@ function finish(handle, HuksOptions) {
huks
.
finish
(
handle
,
HuksOptions
,
function
(
err
,
data
)
{
huks
.
finish
(
handle
,
HuksOptions
,
function
(
err
,
data
)
{
try
{
try
{
if
(
err
.
code
!==
0
)
{
if
(
err
.
code
!==
0
)
{
console
.
log
(
'
test finish err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test finish err information:
"
+
JSON
.
stringify
(
err
));
reject
(
err
);
reject
(
err
);
}
else
{
}
else
{
resolve
(
data
);
resolve
(
data
);
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
'
test finish err information:
'
+
JSON
.
stringify
(
e
));
console
.
log
(
"
test finish err information:
"
+
JSON
.
stringify
(
e
));
reject
(
e
);
reject
(
e
);
}
}
});
});
...
@@ -101,13 +103,13 @@ function abort(handle, HuksOptions) {
...
@@ -101,13 +103,13 @@ function abort(handle, HuksOptions) {
huks
.
abort
(
handle
,
HuksOptions
,
function
(
err
,
data
)
{
huks
.
abort
(
handle
,
HuksOptions
,
function
(
err
,
data
)
{
try
{
try
{
if
(
err
.
code
!==
0
)
{
if
(
err
.
code
!==
0
)
{
console
.
log
(
'
test abort err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test abort err information:
"
+
JSON
.
stringify
(
err
));
reject
(
err
);
reject
(
err
);
}
else
{
}
else
{
resolve
(
data
);
resolve
(
data
);
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
'
test abort err information:
'
+
JSON
.
stringify
(
e
));
console
.
log
(
"
test abort err information:
"
+
JSON
.
stringify
(
e
));
reject
(
e
);
reject
(
e
);
}
}
});
});
...
@@ -119,13 +121,13 @@ function deleteKey(srcKeyAlies, HuksOptions) {
...
@@ -119,13 +121,13 @@ function deleteKey(srcKeyAlies, HuksOptions) {
huks
.
deleteKey
(
srcKeyAlies
,
HuksOptions
,
function
(
err
,
data
)
{
huks
.
deleteKey
(
srcKeyAlies
,
HuksOptions
,
function
(
err
,
data
)
{
try
{
try
{
if
(
err
.
code
!==
0
)
{
if
(
err
.
code
!==
0
)
{
console
.
log
(
'
test deleteKey err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test deleteKey err information:
"
+
JSON
.
stringify
(
err
));
reject
(
err
);
reject
(
err
);
}
else
{
}
else
{
resolve
(
data
);
resolve
(
data
);
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
'
test deleteKey err information:
'
+
JSON
.
stringify
(
e
));
console
.
log
(
"
test deleteKey err information:
"
+
JSON
.
stringify
(
e
));
reject
(
e
);
reject
(
e
);
}
}
});
});
...
@@ -144,7 +146,7 @@ async function publicHmacUpdate(HuksOptions) {
...
@@ -144,7 +146,7 @@ async function publicHmacUpdate(HuksOptions) {
console
.
log
(
`test update data:
${
data
}
`
);
console
.
log
(
`test update data:
${
data
}
`
);
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
'
test update err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test update err information:
"
+
JSON
.
stringify
(
err
));
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
HuksOptions
.
inData
=
huksOptionsInData
;
HuksOptions
.
inData
=
huksOptionsInData
;
...
@@ -152,25 +154,32 @@ async function publicHmacUpdate(HuksOptions) {
...
@@ -152,25 +154,32 @@ async function publicHmacUpdate(HuksOptions) {
let
count
=
Math
.
floor
(
inDataArray
.
length
/
dateSize
);
let
count
=
Math
.
floor
(
inDataArray
.
length
/
dateSize
);
let
remainder
=
inDataArray
.
length
%
dateSize
;
let
remainder
=
inDataArray
.
length
%
dateSize
;
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
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
)
await
update
(
handle
,
HuksOptions
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
console
.
log
(
`test update data:
${
data
}
`
);
console
.
log
(
`test update data:
${
data
}
`
);
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
'
test update err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test update err information:
"
+
JSON
.
stringify
(
err
));
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
}
}
if
(
remainder
!==
0
)
{
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
}
`
);
console
.
log
(
`test update HuksOptions.inData
${
HuksOptions
.
inData
}
`
);
await
update
(
handle
,
HuksOptions
)
await
update
(
handle
,
HuksOptions
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
console
.
log
(
`test update data:
${
data
}
`
);
console
.
log
(
`test update data:
${
data
}
`
);
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
'
test update err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test update err information:
"
+
JSON
.
stringify
(
err
));
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
}
}
...
@@ -181,7 +190,7 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
...
@@ -181,7 +190,7 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
HuksOptions
.
properties
.
splice
(
1
,
0
,
HuksHmac
.
HuksKeySIZE
);
HuksOptions
.
properties
.
splice
(
1
,
0
,
HuksHmac
.
HuksKeySIZE
);
await
generateKey
(
srcKeyAlies
,
HuksOptions
)
await
generateKey
(
srcKeyAlies
,
HuksOptions
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
console
.
log
(
'
test generateKey data =
'
+
JSON
.
stringify
(
data
));
console
.
log
(
"
test generateKey data =
"
+
JSON
.
stringify
(
data
));
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
`test init err: " +
${
JSON
.
stringify
(
err
)}
`
);
console
.
log
(
`test init err: " +
${
JSON
.
stringify
(
err
)}
`
);
...
@@ -199,14 +208,14 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
...
@@ -199,14 +208,14 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
});
});
await
publicHmacUpdate
(
HuksOptions
);
await
publicHmacUpdate
(
HuksOptions
);
if
(
thirdInderfaceName
==
'
finish
'
)
{
if
(
thirdInderfaceName
==
"
finish
"
)
{
HuksOptions
.
inData
=
new
Uint8Array
(
stringToArray
(
'
0
'
));
HuksOptions
.
inData
=
new
Uint8Array
(
stringToArray
(
"
0
"
));
await
finish
(
handle
,
HuksOptions
)
await
finish
(
handle
,
HuksOptions
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
console
.
log
(
`test update data:
${
data
}
`
);
console
.
log
(
`test update data:
${
data
}
`
);
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
'
test update err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test update err information:
"
+
JSON
.
stringify
(
err
));
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
}
else
{
}
else
{
...
@@ -215,7 +224,7 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
...
@@ -215,7 +224,7 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
console
.
log
(
`test abort data:
${
data
}
`
);
console
.
log
(
`test abort data:
${
data
}
`
);
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
'
test abort err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test abort err information:
"
+
JSON
.
stringify
(
err
));
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
}
}
...
@@ -226,161 +235,120 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
...
@@ -226,161 +235,120 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
expect
(
data
.
errorCode
==
0
).
assertTrue
();
expect
(
data
.
errorCode
==
0
).
assertTrue
();
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
'
test deleteKey err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test deleteKey err information:
"
+
JSON
.
stringify
(
err
));
expect
(
null
).
assertFail
();
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
()
{
export
function
SecurityHuksHmacCallbackJsunit
()
{
describe
(
'
SecurityHuksHmacCallbackJsunit
'
,
function
()
{
describe
(
"
SecurityHuksHmacCallbackJsunit
"
,
function
()
{
it
(
'
testHmacSHA1001
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmacSHA1001
"
,
0
,
async
function
(
done
)
{
let
srcKeyAlies
=
'
testHmacDigestSHA1KeyAlias001
'
;
let
srcKeyAlies
=
"
testHmacDigestSHA1KeyAlias001
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSHA1
HuksHmac
.
HuksTagDigestSHA1
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
'
finish
'
);
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
"
finish
"
);
done
();
done
();
});
});
it
(
'
testHmacSHA1002
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmacSHA1002
"
,
0
,
async
function
(
done
)
{
let
srcKeyAlies
=
'
testHmacDigestSHA1KeyAlias002
'
;
let
srcKeyAlies
=
"
testHmacDigestSHA1KeyAlias002
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSHA1
HuksHmac
.
HuksTagDigestSHA1
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
'
abort
'
);
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
"
abort
"
);
done
();
done
();
});
});
it
(
'
testHmacSHA1003
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmacSHA1003
"
,
0
,
async
function
(
done
)
{
let
srcKeyAlies
=
'
testHmacDigestSHA1KeyAlias003
'
;
let
srcKeyAlies
=
"
testHmacDigestSHA1KeyAlias003
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSHA1
HuksHmac
.
HuksTagDigestSHA1
),
),
inData
:
srcData65Kb
,
inData
:
srcData65Kb
,
};
};
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
'
finish
'
);
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
"
finish
"
);
done
();
done
();
});
});
it
(
'
testHmacSHA1004
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmacSHA1004
"
,
0
,
async
function
(
done
)
{
let
srcKeyAlies
=
'
testHmacDigestSHA1KeyAlias004
'
;
let
srcKeyAlies
=
"
testHmacDigestSHA1KeyAlias004
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSHA1
HuksHmac
.
HuksTagDigestSHA1
),
),
inData
:
srcData65Kb
,
inData
:
srcData65Kb
,
};
};
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
'
abort
'
);
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
"
abort
"
);
done
();
done
();
});
});
it
(
'
testHmacSM3001
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmacSM3001
"
,
0
,
async
function
(
done
)
{
let
srcKeyAlies
=
'
testHmacDigestSM3KeyAlias001
'
;
let
srcKeyAlies
=
"
testHmacDigestSM3KeyAlias001
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSM3
HuksHmac
.
HuksTagDigestSM3
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
'
finish
'
);
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
"
finish
"
);
done
();
done
();
});
});
it
(
'
testHmacSM3002
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmacSM3002
"
,
0
,
async
function
(
done
)
{
let
srcKeyAlies
=
'
testHmacDigestSM3KeyAlias002
'
;
let
srcKeyAlies
=
"
testHmacDigestSM3KeyAlias002
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSM3
HuksHmac
.
HuksTagDigestSM3
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
'
abort
'
);
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
"
abort
"
);
done
();
done
();
});
});
it
(
'
testHmacSM3003
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmacSM3003
"
,
0
,
async
function
(
done
)
{
let
srcKeyAlies
=
'
testHmacDigestSM3KeyAlias003
'
;
let
srcKeyAlies
=
"
testHmacDigestSM3KeyAlias003
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSM3
HuksHmac
.
HuksTagDigestSM3
),
),
inData
:
srcData65Kb
,
inData
:
srcData65Kb
,
};
};
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
'
finish
'
);
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
"
finish
"
);
done
();
done
();
});
});
it
(
'
testHmacSM3004
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmacSM3004
"
,
0
,
async
function
(
done
)
{
let
srcKeyAlies
=
'
testHmacDigestSM3KeyAlias004
'
;
let
srcKeyAlies
=
"
testHmacDigestSM3KeyAlias004
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSM3
HuksHmac
.
HuksTagDigestSM3
),
),
inData
:
srcData65Kb
,
inData
:
srcData65Kb
,
};
};
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
'
abort
'
);
await
publicHmacGenFunc
(
srcKeyAlies
,
HuksOptions
,
"
abort
"
);
done
();
done
();
});
});
});
});
}
}
security/security_huks_basic/huks_hmac_callback_BasicTest/src/main/js/test/List.test.js
浏览文件 @
483ffc59
...
@@ -13,12 +13,11 @@
...
@@ -13,12 +13,11 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
{
SecurityHuksAccessControlJsunit
}
from
'
./HMAC/SecurityHuksAccessControlJsunit.test.js
'
import
{
SecurityHuksAccessControlJsunit
}
from
"
./HMAC/SecurityHuksAccessControlJsunit.test.js
"
;
import
{
SecurityHuksHmacBasicCallbackJsunit_test
,
SecurityHuksHmacCallbackJsunit
}
from
'
./HMAC/SecurityHuksHmacBasicCallbackJsunit.test.js
'
import
{
SecurityHuksHmacCallbackJsunit
}
from
"
./HMAC/SecurityHuksHmacBasicCallbackJsunit.test.js
"
;
import
{
SecurityHuksImportJsunit
}
from
'
./HMAC/SecurityHuksImportJsunit.test.js
'
import
{
SecurityHuksImportJsunit
}
from
"
./HMAC/SecurityHuksImportJsunit.test.js
"
;
export
default
function
testsuite
()
{
export
default
function
testsuite
()
{
SecurityHuksAccessControlJsunit
()
SecurityHuksAccessControlJsunit
();
SecurityHuksHmacBasicCallbackJsunit_test
()
SecurityHuksHmacCallbackJsunit
();
SecurityHuksHmacCallbackJsunit
()
SecurityHuksImportJsunit
();
SecurityHuksImportJsunit
()
}
}
security/security_huks_basic/huks_hmac_promise_BasicTest/src/main/js/test/HMAC/SecurityHuksFaceFingerNormalJsunit.test.js
浏览文件 @
483ffc59
此差异已折叠。
点击以展开。
security/security_huks_basic/huks_hmac_promise_BasicTest/src/main/js/test/HMAC/SecurityHuksHmacBasicPromiseJsunit.test.js
浏览文件 @
483ffc59
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
{
describe
,
it
,
expect
}
from
'
@ohos/hypium
'
;
import
{
describe
,
it
,
expect
}
from
"
@ohos/hypium
"
;
import
huks
from
'
@ohos.security.huks
'
;
import
huks
from
"
@ohos.security.huks
"
;
import
Data
from
'
../../../../../../utils/data.json
'
;
import
Data
from
"
../../../../../../utils/data.json
"
;
import
{
HuksHmac
}
from
'
../../../../../../utils/param/hmac/publicHmacParam.js
'
;
import
{
HuksHmac
}
from
"
../../../../../../utils/param/hmac/publicHmacParam.js
"
;
import
{
stringToArray
}
from
'
../../../../../../utils/param/publicFunc.js
'
;
import
{
stringToArray
}
from
"
../../../../../../utils/param/publicFunc.js
"
;
var
handle
;
var
handle
;
let
srcData63Kb
=
Data
.
Date63KB
;
let
srcData63Kb
=
Data
.
Date63KB
;
...
@@ -32,7 +32,7 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions) {
...
@@ -32,7 +32,7 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions) {
expect
(
data
.
errorCode
==
0
).
assertTrue
();
expect
(
data
.
errorCode
==
0
).
assertTrue
();
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
'
test generateKey err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test generateKey err information:
"
+
JSON
.
stringify
(
err
));
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
HuksOptions
.
properties
.
splice
(
1
,
1
);
HuksOptions
.
properties
.
splice
(
1
,
1
);
...
@@ -63,19 +63,26 @@ async function publicHmacUpdateFunc(HuksOptions) {
...
@@ -63,19 +63,26 @@ async function publicHmacUpdateFunc(HuksOptions) {
let
count
=
Math
.
floor
(
inDataArray
.
length
/
dateSize
);
let
count
=
Math
.
floor
(
inDataArray
.
length
/
dateSize
);
let
remainder
=
inDataArray
.
length
%
dateSize
;
let
remainder
=
inDataArray
.
length
%
dateSize
;
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
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
);
await
update
(
handle
,
HuksOptions
);
}
}
if
(
remainder
!==
0
)
{
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
);
await
update
(
handle
,
HuksOptions
);
}
}
}
}
}
}
async
function
publicHmacFinish
(
HuksOptions
,
thirdInderfaceName
)
{
async
function
publicHmacFinish
(
HuksOptions
,
thirdInderfaceName
)
{
if
(
thirdInderfaceName
==
'
finish
'
)
{
if
(
thirdInderfaceName
==
"
finish
"
)
{
HuksOptions
.
inData
=
new
Uint8Array
(
stringToArray
(
'
0
'
));
HuksOptions
.
inData
=
new
Uint8Array
(
stringToArray
(
"
0
"
));
await
huks
await
huks
.
finish
(
handle
,
HuksOptions
)
.
finish
(
handle
,
HuksOptions
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
...
@@ -83,10 +90,10 @@ async function publicHmacFinish(HuksOptions, thirdInderfaceName) {
...
@@ -83,10 +90,10 @@ async function publicHmacFinish(HuksOptions, thirdInderfaceName) {
expect
(
data
.
errorCode
==
0
).
assertTrue
();
expect
(
data
.
errorCode
==
0
).
assertTrue
();
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
'
test finish err information:
'
+
err
);
console
.
log
(
"
test finish err information:
"
+
err
);
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
}
else
if
(
thirdInderfaceName
==
'
abort
'
)
{
}
else
if
(
thirdInderfaceName
==
"
abort
"
)
{
await
huks
await
huks
.
abort
(
handle
,
HuksOptions
)
.
abort
(
handle
,
HuksOptions
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
...
@@ -94,7 +101,7 @@ async function publicHmacFinish(HuksOptions, thirdInderfaceName) {
...
@@ -94,7 +101,7 @@ async function publicHmacFinish(HuksOptions, thirdInderfaceName) {
expect
(
data
.
errorCode
==
0
).
assertTrue
();
expect
(
data
.
errorCode
==
0
).
assertTrue
();
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
'
test abort err information:
'
+
err
);
console
.
log
(
"
test abort err information:
"
+
err
);
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
}
}
...
@@ -109,7 +116,7 @@ async function publicHmacDelete(srcKeyAlies, HuksOptions) {
...
@@ -109,7 +116,7 @@ async function publicHmacDelete(srcKeyAlies, HuksOptions) {
expect
(
data
.
errorCode
==
0
).
assertTrue
();
expect
(
data
.
errorCode
==
0
).
assertTrue
();
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
'
test deleteKey err information:
'
+
JSON
.
stringify
(
err
));
console
.
log
(
"
test deleteKey err information:
"
+
JSON
.
stringify
(
err
));
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
}
}
...
@@ -134,105 +141,124 @@ async function update(handle, HuksOptions) {
...
@@ -134,105 +141,124 @@ async function update(handle, HuksOptions) {
expect
(
data
.
errorCode
==
0
).
assertTrue
();
expect
(
data
.
errorCode
==
0
).
assertTrue
();
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
'
test update err information:
'
+
err
);
console
.
log
(
"
test update err information:
"
+
err
);
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
}
}
export
default
function
SecurityHuksHmacBasicPromiseJsunit
()
{
export
default
function
SecurityHuksHmacBasicPromiseJsunit
()
{
describe
(
'
SecurityHuksHmacBasicPromiseJsunit
'
,
function
()
{
describe
(
"
SecurityHuksHmacBasicPromiseJsunit
"
,
function
()
{
it
(
'
testHmac101
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmac101
"
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testHmacDigestSHA1KeyAlias101
'
;
const
srcKeyAlies
=
"
testHmacDigestSHA1KeyAlias101
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSHA1
),
properties
:
new
Array
(
inData
:
srcData63Kb
,
HuksHmac
.
HuksKeyAlg
,
};
HuksHmac
.
HuksKeyPurpose
,
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
'
finish
'
);
HuksHmac
.
HuksTagDigestSHA1
done
();
),
});
inData
:
srcData63Kb
,
};
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
"
finish
"
);
done
();
});
it
(
'
testHmac102
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmac102
"
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testHmacDigestSHA1KeyAlias102
'
;
const
srcKeyAlies
=
"
testHmacDigestSHA1KeyAlias102
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSHA1
),
properties
:
new
Array
(
inData
:
srcData63Kb
,
HuksHmac
.
HuksKeyAlg
,
};
HuksHmac
.
HuksKeyPurpose
,
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
'
abort
'
);
HuksHmac
.
HuksTagDigestSHA1
done
();
),
});
inData
:
srcData63Kb
,
};
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
"
abort
"
);
done
();
});
it
(
'
testHmac103
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmac103
"
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testHmacDigestSHA1KeyAlias103
'
;
const
srcKeyAlies
=
"
testHmacDigestSHA1KeyAlias103
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSHA1
),
properties
:
new
Array
(
inData
:
srcData65Kb
,
HuksHmac
.
HuksKeyAlg
,
};
HuksHmac
.
HuksKeyPurpose
,
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
'
finish
'
);
HuksHmac
.
HuksTagDigestSHA1
done
();
),
});
inData
:
srcData65Kb
,
};
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
"
finish
"
);
done
();
});
it
(
'
testHmac104
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmac104
"
,
0
,
async
function
(
done
)
{
const
srcKeyAlies
=
'
testHmacDigestSHA1KeyAlias104
'
;
const
srcKeyAlies
=
"
testHmacDigestSHA1KeyAlias104
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSHA1
),
properties
:
new
Array
(
inData
:
srcData65Kb
,
HuksHmac
.
HuksKeyAlg
,
};
HuksHmac
.
HuksKeyPurpose
,
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
'
abort
'
);
HuksHmac
.
HuksTagDigestSHA1
done
();
),
});
inData
:
srcData65Kb
,
it
(
'
testHmacSM3001
'
,
0
,
async
function
(
done
)
{
};
let
srcKeyAlies
=
'
testHmacDigestSM3KeyAlias001
'
;
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
"
abort
"
);
let
HuksOptions
=
{
done
();
properties
:
new
Array
(
});
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSM3
),
inData
:
srcData63Kb
,
};
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
'
finish
'
);
done
();
});
it
(
'
testHmacSM3002
'
,
0
,
async
function
(
done
)
{
it
(
"
testHmacSM3101
"
,
0
,
async
function
(
done
)
{
let
srcKeyAlies
=
'
testHmacDigestSM3KeyAlias002
'
;
let
srcKeyAlies
=
"
testHmacDigestSM3KeyAlias001
"
;
let
HuksOptions
=
{
let
HuksOptions
=
{
properties
:
new
Array
(
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSM3
HuksHmac
.
HuksTagDigestSM3
),
),
inData
:
srcData63Kb
,
inData
:
srcData63Kb
,
};
};
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
'
abort
'
);
done
();
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
"
finish
"
);
});
done
();
it
(
'
testHmacSM3003
'
,
0
,
async
function
(
done
)
{
});
let
srcKeyAlies
=
'
testHmacDigestSM3KeyAlias003
'
;
let
HuksOptions
=
{
it
(
"
testHmacSM3102
"
,
0
,
async
function
(
done
)
{
properties
:
new
Array
(
let
srcKeyAlies
=
"
testHmacDigestSM3KeyAlias002
"
;
HuksHmac
.
HuksKeyAlg
,
let
HuksOptions
=
{
HuksHmac
.
HuksKeyPurpose
,
properties
:
new
Array
(
HuksHmac
.
HuksTagDigestSM3
HuksHmac
.
HuksKeyAlg
,
),
HuksHmac
.
HuksKeyPurpose
,
inData
:
srcData65Kb
,
HuksHmac
.
HuksTagDigestSM3
};
),
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
'
finish
'
);
inData
:
srcData63Kb
,
done
();
};
});
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
"
abort
"
);
it
(
'
testHmacSM3004
'
,
0
,
async
function
(
done
)
{
done
();
let
srcKeyAlies
=
'
testHmacDigestSM3KeyAlias004
'
;
});
let
HuksOptions
=
{
properties
:
new
Array
(
it
(
"
testHmacSM3103
"
,
0
,
async
function
(
done
)
{
HuksHmac
.
HuksKeyAlg
,
let
srcKeyAlies
=
"
testHmacDigestSM3KeyAlias003
"
;
HuksHmac
.
HuksKeyPurpose
,
let
HuksOptions
=
{
HuksHmac
.
HuksTagDigestSM3
properties
:
new
Array
(
),
HuksHmac
.
HuksKeyAlg
,
inData
:
srcData65Kb
,
HuksHmac
.
HuksKeyPurpose
,
};
HuksHmac
.
HuksTagDigestSM3
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
'
abort
'
);
),
done
();
inData
:
srcData65Kb
,
};
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
"
finish
"
);
done
();
});
it
(
"
testHmacSM3104
"
,
0
,
async
function
(
done
)
{
let
srcKeyAlies
=
"
testHmacDigestSM3KeyAlias004
"
;
let
HuksOptions
=
{
properties
:
new
Array
(
HuksHmac
.
HuksKeyAlg
,
HuksHmac
.
HuksKeyPurpose
,
HuksHmac
.
HuksTagDigestSM3
),
inData
:
srcData65Kb
,
};
await
publicHmacFunc
(
srcKeyAlies
,
HuksOptions
,
"
abort
"
);
done
();
});
});
});
});
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录