提交 2cc4dc61 编写于 作者: Y yuanyuhang

yuanyuhang1@huawei.com

Signed-off-by: Nyuanyuhang <yuanyuhang1@huawei.com>
Change-Id: I625054b600c299a08841956413b9df0ea16f2805
上级 15dee682
...@@ -17,7 +17,7 @@ import { describe, it } from 'deccjsunit/index'; ...@@ -17,7 +17,7 @@ import { describe, it } from 'deccjsunit/index';
import { HuksCipherSM4 } from '../../../../../../../utils/param/cipher/publicCipherParam'; import { HuksCipherSM4 } from '../../../../../../../utils/param/cipher/publicCipherParam';
import { HksTag } from '../../../../../../../utils/param/publicParam'; import { HksTag } from '../../../../../../../utils/param/publicParam';
import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc'; import { stringToUint8Array } from '../../../../../../../utils/param/publicFunc';
import { publicCipherFunc, IV, encryptedResult } from './SecurityHuksCipherAESBasicPromiseJsunit.test'; import { publicCipherFunc, IV, updateResult } from './SecurityHuksCipherAESBasicPromiseJsunit.test';
const plainString48Bytes = 'Hks_SM4_Cipher_Test_000000000000000000000_string'; const plainString48Bytes = 'Hks_SM4_Cipher_Test_000000000000000000000_string';
const plainData48Bytes = stringToUint8Array(plainString48Bytes); const plainData48Bytes = stringToUint8Array(plainString48Bytes);
...@@ -70,7 +70,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { ...@@ -70,7 +70,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () {
HuksCipherSM4.HuksKeySM4BLOCKMODECBC, HuksCipherSM4.HuksKeySM4BLOCKMODECBC,
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
), ),
inData: new Uint8Array(encryptedResult), inData: new Uint8Array(updateResult),
}; };
await publicCipherFunc( await publicCipherFunc(
srcKeyAlias, srcKeyAlias,
...@@ -114,7 +114,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { ...@@ -114,7 +114,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () {
HuksCipherSM4.HuksKeySM4BLOCKMODECBC, HuksCipherSM4.HuksKeySM4BLOCKMODECBC,
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
), ),
inData: new Uint8Array(encryptedResult), inData: new Uint8Array(updateResult),
}; };
await publicCipherFunc( await publicCipherFunc(
srcKeyAlias, srcKeyAlias,
...@@ -211,7 +211,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { ...@@ -211,7 +211,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () {
HuksCipherSM4.HuksKeySM4BLOCKMODECBC, HuksCipherSM4.HuksKeySM4BLOCKMODECBC,
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
), ),
inData: new Uint8Array(encryptedResult), inData: new Uint8Array(updateResult),
}; };
await publicCipherFunc( await publicCipherFunc(
srcKeyAlias, srcKeyAlias,
...@@ -255,7 +255,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { ...@@ -255,7 +255,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () {
HuksCipherSM4.HuksKeySM4BLOCKMODECBC, HuksCipherSM4.HuksKeySM4BLOCKMODECBC,
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
), ),
inData: new Uint8Array(encryptedResult), inData: new Uint8Array(updateResult),
}; };
await publicCipherFunc( await publicCipherFunc(
srcKeyAlias, srcKeyAlias,
...@@ -352,7 +352,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { ...@@ -352,7 +352,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () {
HuksCipherSM4.HuksKeySM4BLOCKMODECTR, HuksCipherSM4.HuksKeySM4BLOCKMODECTR,
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
), ),
inData: new Uint8Array(encryptedResult), inData: new Uint8Array(updateResult),
}; };
await publicCipherFunc( await publicCipherFunc(
srcKeyAlias, srcKeyAlias,
...@@ -396,7 +396,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { ...@@ -396,7 +396,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () {
HuksCipherSM4.HuksKeySM4BLOCKMODECTR, HuksCipherSM4.HuksKeySM4BLOCKMODECTR,
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
), ),
inData: new Uint8Array(encryptedResult), inData: new Uint8Array(updateResult),
}; };
await publicCipherFunc( await publicCipherFunc(
srcKeyAlias, srcKeyAlias,
...@@ -493,7 +493,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { ...@@ -493,7 +493,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () {
HuksCipherSM4.HuksKeySM4BLOCKMODEECB, HuksCipherSM4.HuksKeySM4BLOCKMODEECB,
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
), ),
inData: new Uint8Array(encryptedResult), inData: new Uint8Array(updateResult),
}; };
await publicCipherFunc( await publicCipherFunc(
srcKeyAlias, srcKeyAlias,
...@@ -537,7 +537,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { ...@@ -537,7 +537,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () {
HuksCipherSM4.HuksKeySM4BLOCKMODEECB, HuksCipherSM4.HuksKeySM4BLOCKMODEECB,
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
), ),
inData: new Uint8Array(encryptedResult), inData: new Uint8Array(updateResult),
}; };
await publicCipherFunc( await publicCipherFunc(
srcKeyAlias, srcKeyAlias,
...@@ -634,7 +634,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { ...@@ -634,7 +634,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () {
HuksCipherSM4.HuksKeySM4BLOCKMODEECB, HuksCipherSM4.HuksKeySM4BLOCKMODEECB,
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
), ),
inData: new Uint8Array(encryptedResult), inData: new Uint8Array(updateResult),
}; };
await publicCipherFunc( await publicCipherFunc(
srcKeyAlias, srcKeyAlias,
...@@ -678,7 +678,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { ...@@ -678,7 +678,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () {
HuksCipherSM4.HuksKeySM4BLOCKMODEECB, HuksCipherSM4.HuksKeySM4BLOCKMODEECB,
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
), ),
inData: new Uint8Array(encryptedResult), inData: new Uint8Array(updateResult),
}; };
await publicCipherFunc( await publicCipherFunc(
srcKeyAlias, srcKeyAlias,
......
...@@ -34,7 +34,6 @@ describe('SecurityHuksSignVerifySM2CallbackJsunit', function () { ...@@ -34,7 +34,6 @@ describe('SecurityHuksSignVerifySM2CallbackJsunit', function () {
}; };
finishOutData = await publicSignVerifyFunc( finishOutData = await publicSignVerifyFunc(
srcKeyAlies, srcKeyAlies,
srcKeyAlies + 'New',
HuksOptions, HuksOptions,
'finish', 'finish',
true, true,
......
...@@ -34,7 +34,6 @@ describe('SecurityHuksSignVerifySM2CallbackJsunit', function () { ...@@ -34,7 +34,6 @@ describe('SecurityHuksSignVerifySM2CallbackJsunit', function () {
}; };
finishOutData = await publicSignVerifyFunc( finishOutData = await publicSignVerifyFunc(
srcKeyAlies, srcKeyAlies,
srcKeyAlies + 'New',
HuksOptions, HuksOptions,
'finish', 'finish',
true, true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册