diff --git a/test/unittest/src/crypto_aes_cipher_test.cpp b/test/unittest/src/crypto_aes_cipher_test.cpp index c50e70cf2d2d1031eff4f2568059b4403edea136..f858dbcd5ecf2e6a4df7fea57da7188537e543c2 100644 --- a/test/unittest/src/crypto_aes_cipher_test.cpp +++ b/test/unittest/src/crypto_aes_cipher_test.cpp @@ -115,7 +115,7 @@ static int32_t GeneratorFile(const char *fileName, int32_t genFileSize) } uint8_t buffer[FILE_BLOCK_SIZE] = {0}; std::ifstream file(fileName); - + if (file.good()) { file.close(); return 0; @@ -429,7 +429,12 @@ static int32_t AesNoUpdateDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSp return ret; } - +/** + * @tc.name: AesEncryptTest.AesEncryptTest001 + * @tc.desc: Verify whether the crypto framework is normal. + * @tc.type: FUNC + * @tc.require: I5QWEO + */ HWTEST_F(AesEncryptTest, AesEncryptTest001, TestSize.Level0) { int ret = 0; @@ -476,6 +481,12 @@ clearup: EXPECT_NE(ret, 0); } +/** + * @tc.name: AesEncryptTest.AesEncryptTest002 + * @tc.desc: Verify AES128 cipher algorithm. + * @tc.type: FUNC + * @tc.require: I5QWEG + */ HWTEST_F(AesEncryptTest, AesEncryptTest002, TestSize.Level0) { int ret = 0; diff --git a/test/unittest/src/crypto_ecc_asy_key_generator_test.cpp b/test/unittest/src/crypto_ecc_asy_key_generator_test.cpp index bf27a80e4106d51eb0f549dd01deb29ec2a4e256..7feabf49834f51c60fc54d71c1888c287bf9abcc 100644 --- a/test/unittest/src/crypto_ecc_asy_key_generator_test.cpp +++ b/test/unittest/src/crypto_ecc_asy_key_generator_test.cpp @@ -129,6 +129,12 @@ static HcfObjectBase obj = { .destroy = NULL }; +/** + * @tc.name: EccAsyKeyGeneratorTest.EccAsyKeyGeneratorTest001 + * @tc.desc: Verify that the creation of the ECC224 key pair generator is normal. + * @tc.type: FUNC + * @tc.require: I5QWEI + */ HWTEST_F(EccAsyKeyGeneratorTest, EccAsyKeyGeneratorTest001, TestSize.Level0) { HcfAsyKeyGenerator *generator = NULL; diff --git a/test/unittest/src/crypto_md_test.cpp b/test/unittest/src/crypto_md_test.cpp index 72ddd618441552404686228cfdc937fd83d40236..b15cf9101e9120a7a02404bd30c096fea85b7f92 100644 --- a/test/unittest/src/crypto_md_test.cpp +++ b/test/unittest/src/crypto_md_test.cpp @@ -66,6 +66,12 @@ static void PrintfBlobInHex(uint8_t *data, size_t dataLen) printf("\n"); } +/** + * @tc.name: CryptoFrameworkMdTest.CryptoFrameworkMdCreateTest001 + * @tc.desc: Verify that the creation of the SHA1 Md obj is normal. + * @tc.type: FUNC + * @tc.require: I5QWEM + */ HWTEST_F(CryptoFrameworkMdTest, CryptoFrameworkMdCreateTest001, TestSize.Level0) { int32_t ret = 0; diff --git a/test/unittest/src/crypto_rand_test.cpp b/test/unittest/src/crypto_rand_test.cpp index 53cc0d28cb75774838bfc61401e49a8b795a8cda..12b41fd140bd7a4b0b5764f4d9547b4631bf0441 100644 --- a/test/unittest/src/crypto_rand_test.cpp +++ b/test/unittest/src/crypto_rand_test.cpp @@ -43,6 +43,12 @@ void CryptoFrameworkRandTest::TearDown() // add destroy here, this will be calle { } +/** + * @tc.name: CryptoFrameworkRandTest.CryptoFrameworkRandCreateTest001 + * @tc.desc: Verify that the creation of the random obj is normal. + * @tc.type: FUNC + * @tc.require: I5QWEN + */ HWTEST_F(CryptoFrameworkRandTest, CryptoFrameworkRandCreateTest001, TestSize.Level0) { int32_t ret = 0; diff --git a/test/unittest/src/crypto_x509_certificate_test.cpp b/test/unittest/src/crypto_x509_certificate_test.cpp index 3a3d17873da2978a521ac94df09797980f660565..625cb9fc22871ed69b0ecc14805864075a17c5f0 100644 --- a/test/unittest/src/crypto_x509_certificate_test.cpp +++ b/test/unittest/src/crypto_x509_certificate_test.cpp @@ -260,7 +260,12 @@ void X509CertTest::TearDown() { } -/* Valid PEM format. */ +/** + * @tc.name: X509CertTest.GenerateCert001 + * @tc.desc: Generate valid PEM format certificate. + * @tc.type: FUNC + * @tc.require: I5QDNN + */ HWTEST_F(X509CertTest, GenerateCert001, TestSize.Level0) { HcfX509Certificate *x509Cert = nullptr;