From 2cc4dc616301fe6c41f68acdd21b5fdacb7e5ed3 Mon Sep 17 00:00:00 2001 From: yuanyuhang Date: Thu, 23 Jun 2022 18:35:43 +0800 Subject: [PATCH] yuanyuhang1@huawei.com Signed-off-by: yuanyuhang Change-Id: I625054b600c299a08841956413b9df0ea16f2805 --- ...ityHuksCipherSM4BasicPromiseJsunit.test.js | 22 +++++++++---------- ...ksSM2BasicFinish63KBCallbackJsunit.test.js | 1 - ...ksSM2BasicFinish65KBCallbackJsunit.test.js | 1 - 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/security/security_huks_basic/huks_cipher_promise_BasicTest/entry/src/main/js/test/Cipher/SecurityHuksCipherSM4BasicPromiseJsunit.test.js b/security/security_huks_basic/huks_cipher_promise_BasicTest/entry/src/main/js/test/Cipher/SecurityHuksCipherSM4BasicPromiseJsunit.test.js index a156d2231..fb00564ac 100755 --- a/security/security_huks_basic/huks_cipher_promise_BasicTest/entry/src/main/js/test/Cipher/SecurityHuksCipherSM4BasicPromiseJsunit.test.js +++ b/security/security_huks_basic/huks_cipher_promise_BasicTest/entry/src/main/js/test/Cipher/SecurityHuksCipherSM4BasicPromiseJsunit.test.js @@ -17,7 +17,7 @@ import { describe, it } from 'deccjsunit/index'; import { HuksCipherSM4 } from '../../../../../../../utils/param/cipher/publicCipherParam'; import { HksTag } from '../../../../../../../utils/param/publicParam'; 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 plainData48Bytes = stringToUint8Array(plainString48Bytes); @@ -70,7 +70,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { HuksCipherSM4.HuksKeySM4BLOCKMODECBC, { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } ), - inData: new Uint8Array(encryptedResult), + inData: new Uint8Array(updateResult), }; await publicCipherFunc( srcKeyAlias, @@ -114,7 +114,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { HuksCipherSM4.HuksKeySM4BLOCKMODECBC, { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } ), - inData: new Uint8Array(encryptedResult), + inData: new Uint8Array(updateResult), }; await publicCipherFunc( srcKeyAlias, @@ -211,7 +211,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { HuksCipherSM4.HuksKeySM4BLOCKMODECBC, { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } ), - inData: new Uint8Array(encryptedResult), + inData: new Uint8Array(updateResult), }; await publicCipherFunc( srcKeyAlias, @@ -255,7 +255,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { HuksCipherSM4.HuksKeySM4BLOCKMODECBC, { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } ), - inData: new Uint8Array(encryptedResult), + inData: new Uint8Array(updateResult), }; await publicCipherFunc( srcKeyAlias, @@ -352,7 +352,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { HuksCipherSM4.HuksKeySM4BLOCKMODECTR, { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } ), - inData: new Uint8Array(encryptedResult), + inData: new Uint8Array(updateResult), }; await publicCipherFunc( srcKeyAlias, @@ -396,7 +396,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { HuksCipherSM4.HuksKeySM4BLOCKMODECTR, { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } ), - inData: new Uint8Array(encryptedResult), + inData: new Uint8Array(updateResult), }; await publicCipherFunc( srcKeyAlias, @@ -493,7 +493,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { HuksCipherSM4.HuksKeySM4BLOCKMODEECB, { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } ), - inData: new Uint8Array(encryptedResult), + inData: new Uint8Array(updateResult), }; await publicCipherFunc( srcKeyAlias, @@ -537,7 +537,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { HuksCipherSM4.HuksKeySM4BLOCKMODEECB, { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } ), - inData: new Uint8Array(encryptedResult), + inData: new Uint8Array(updateResult), }; await publicCipherFunc( srcKeyAlias, @@ -634,7 +634,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { HuksCipherSM4.HuksKeySM4BLOCKMODEECB, { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } ), - inData: new Uint8Array(encryptedResult), + inData: new Uint8Array(updateResult), }; await publicCipherFunc( srcKeyAlias, @@ -678,7 +678,7 @@ describe('SecurityHuksCipherSM4PromiseJsunit', function () { HuksCipherSM4.HuksKeySM4BLOCKMODEECB, { tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) } ), - inData: new Uint8Array(encryptedResult), + inData: new Uint8Array(updateResult), }; await publicCipherFunc( srcKeyAlias, diff --git a/security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksSM2BasicFinish63KBCallbackJsunit.test.js b/security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksSM2BasicFinish63KBCallbackJsunit.test.js index a1268c1b1..c4792ffa3 100755 --- a/security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksSM2BasicFinish63KBCallbackJsunit.test.js +++ b/security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksSM2BasicFinish63KBCallbackJsunit.test.js @@ -34,7 +34,6 @@ describe('SecurityHuksSignVerifySM2CallbackJsunit', function () { }; finishOutData = await publicSignVerifyFunc( srcKeyAlies, - srcKeyAlies + 'New', HuksOptions, 'finish', true, diff --git a/security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksSM2BasicFinish65KBCallbackJsunit.test.js b/security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksSM2BasicFinish65KBCallbackJsunit.test.js index 0aa169852..b9142b542 100755 --- a/security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksSM2BasicFinish65KBCallbackJsunit.test.js +++ b/security/security_huks_basic/huks_signverify_callback_BasicTest/entry/src/main/js/test/SignVerify/SecurityHuksSM2BasicFinish65KBCallbackJsunit.test.js @@ -34,7 +34,6 @@ describe('SecurityHuksSignVerifySM2CallbackJsunit', function () { }; finishOutData = await publicSignVerifyFunc( srcKeyAlies, - srcKeyAlies + 'New', HuksOptions, 'finish', true, -- GitLab