Lines Matching refs:authId
466 void ImportKeyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
467 void ExportPublicKeyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
469 void GetKeyParamSetTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
470 void KeyExistTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
472 …void SignTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet, const struct Hks…
473 …void VerifyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet, const struct H…
475 void EncryptTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
476 void DecryptTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet,
478 void AgreeKeyTest(const struct HksBlob *authId);
479 void DeriveKeyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
480 void MacTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
535 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; in GenerateKeyTest() local
549 EXPECT_EQ(HksGenerateKey(&authId, paramInSet, NULL), HKS_SUCCESS); in GenerateKeyTest()
554 void ApiPressureTest::ImportKeyTest(const struct HksBlob *authId, const struct HksParamSet *paramIn… in ImportKeyTest() argument
558 HksExportPublicKey(authId, paramInSet, &pubKey); in ImportKeyTest()
569 void ApiPressureTest::ExportPublicKeyTest(const struct HksBlob *authId, const struct HksParamSet *p… in ExportPublicKeyTest() argument
578 EXPECT_EQ(HksExportPublicKey(authId, paramInSet, &pubKey), HKS_SUCCESS); in ExportPublicKeyTest()
591 struct HksBlob authId = { .size = (uint32_t)key.length(), .data = (uint8_t *)&key[0] }; in DeleteKeyTest() local
605 HksGenerateKey(&authId, paramInSet, NULL); in DeleteKeyTest()
606 EXPECT_EQ(HksDeleteKey(&authId, paramInSet), HKS_SUCCESS); in DeleteKeyTest()
611 void ApiPressureTest::GetKeyParamSetTest(const struct HksBlob *authId, const struct HksParamSet *pa… in GetKeyParamSetTest() argument
626 EXPECT_EQ(HksGetKeyParamSet(authId, paramInSet, paramOutSet), HKS_SUCCESS); in GetKeyParamSetTest()
632 void ApiPressureTest::KeyExistTest(const struct HksBlob *authId, const struct HksParamSet *paramInS… in KeyExistTest() argument
638 EXPECT_EQ(HksKeyExist(authId, paramInSet), HKS_SUCCESS); in KeyExistTest()
644 …struct HksBlob authId = { .size = RANDOM_KEY_SIZE, .data = (uint8_t *)HksMalloc(RANDOM_KEY_SIZE) }; in GenerateRandomTest() local
645 ASSERT_NE(authId.data, nullptr); in GenerateRandomTest()
660 EXPECT_EQ(HksGenerateRandom(paramInSet, &authId), HKS_SUCCESS); in GenerateRandomTest()
662 HksFree(authId.data); in GenerateRandomTest()
667 … const struct HksBlob *authId, const struct HksParamSet *paramInSet, const struct HksBlob *message) in SignTest() argument
675 EXPECT_EQ(HksSign(authId, paramInSet, message, &signature), HKS_SUCCESS); in SignTest()
680 void ApiPressureTest::VerifyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet, in VerifyTest() argument
687 EXPECT_EQ(HksVerify(authId, paramInSet, message, signature), HKS_SUCCESS); in VerifyTest()
691 void ApiPressureTest::EncryptTest(const struct HksBlob *authId, const struct HksParamSet *paramInSe… in EncryptTest() argument
703 EXPECT_EQ(HksEncrypt(authId, paramInSet, &plainText, &cipherText), HKS_SUCCESS); in EncryptTest()
708 void ApiPressureTest::DecryptTest(const struct HksBlob *authId, const struct HksParamSet *paramInSe… in DecryptTest() argument
717 EXPECT_EQ(HksDecrypt(authId, paramInSet, cipherText, &plainTextDecrypt), HKS_SUCCESS); in DecryptTest()
722 void ApiPressureTest::AgreeKeyTest(const struct HksBlob *authId) in AgreeKeyTest() argument
726 HksExportPublicKey(authId, NULL, &pubKey); in AgreeKeyTest()
745 EXPECT_EQ(HksAgreeKey(paramInSet, authId, &pubKey, &agreeKey), HKS_SUCCESS); in AgreeKeyTest()
752 void ApiPressureTest::DeriveKeyTest(const struct HksBlob *authId, const struct HksParamSet *paramIn… in DeriveKeyTest() argument
760 EXPECT_EQ(HksDeriveKey(paramInSet, authId, &derivedKey), HKS_SUCCESS); in DeriveKeyTest()
765 void ApiPressureTest::MacTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet) in MacTest() argument
776 EXPECT_EQ(HksMac(authId, paramInSet, &message, &macMessage), HKS_SUCCESS); in MacTest()
806 struct HksBlob authId = { .size = (uint32_t)key.length(), .data = (uint8_t *)&key[0] }; in CipherScene() local
816 HksGenerateKey(&authId, paramInSet, NULL); in CipherScene()
837 HksEncrypt(&authId, paramInSet, &plainText, &cipherText); in CipherScene()
840 EXPECT_EQ(HksDecrypt(&authId, paramInSet, &cipherText, &plainTextDecrypt), HKS_SUCCESS); in CipherScene()
841 (void)HksDeleteKey(&authId, nullptr); in CipherScene()
851 struct HksBlob authId = { .size = (uint32_t)key.length(), .data = (uint8_t *)&key[0] }; in SignScene() local
867 HksGenerateKey(&authId, paramInSet, NULL); in SignScene()
873 HksSign(&authId, paramInSet, &message, &signature); in SignScene()
874 EXPECT_EQ(HksVerify(&authId, paramInSet, &message, &signature), HKS_SUCCESS); in SignScene()
875 (void)HksDeleteKey(&authId, nullptr); in SignScene()
884 struct HksBlob authId = { .size = (uint32_t)key.length(), .data = (uint8_t *)&key[0] }; in AgreeScene() local
904 HksGenerateKey(&authId, generateKeyParam, NULL); in AgreeScene()
907 HksExportPublicKey(&authId, generateKeyParam, &pubKey); in AgreeScene()
910 EXPECT_EQ(HksAgreeKey(agreeKeyParam, &authId, &pubKey, &agreeKey), HKS_SUCCESS); in AgreeScene()
911 (void)HksDeleteKey(&authId, nullptr); in AgreeScene()
1000 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1001 (void)HksDeleteKey(&authId, nullptr);
1014 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1028 HksGenerateKey(&authId, paramInSet, NULL);
1031 … threads.emplace_back(std::thread(&ApiPressureTest::ImportKeyTest, this, &authId, paramInSet));
1038 (void)HksDeleteKey(&authId, nullptr);
1050 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1064 HksGenerateKey(&authId, paramInSet, NULL);
1067 …threads.emplace_back(std::thread(&ApiPressureTest::ExportPublicKeyTest, this, &authId, paramInSet)…
1074 (void)HksDeleteKey(&authId, nullptr);
1107 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1121 HksGenerateKey(&authId, paramInSet, NULL);
1124 …threads.emplace_back(std::thread(&ApiPressureTest::GetKeyParamSetTest, this, &authId, paramInSet));
1131 (void)HksDeleteKey(&authId, nullptr);
1143 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1157 HksGenerateKey(&authId, paramInSet, NULL);
1160 … threads.emplace_back(std::thread(&ApiPressureTest::KeyExistTest, this, &authId, paramInSet));
1167 (void)HksDeleteKey(&authId, nullptr);
1200 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1214 HksGenerateKey(&authId, paramInSet, NULL);
1220 …threads.emplace_back(std::thread(&ApiPressureTest::SignTest, this, &authId, paramInSet, &message));
1227 (void)HksDeleteKey(&authId, nullptr);
1239 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1253 HksGenerateKey(&authId, paramInSet, NULL);
1259 HksSign(&authId, paramInSet, &message, &signature);
1263 … std::thread(&ApiPressureTest::VerifyTest, this, &authId, paramInSet, &message, &signature));
1270 (void)HksDeleteKey(&authId, nullptr);
1283 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1302 HksGenerateKey(&authId, paramInSet, NULL);
1305 threads.emplace_back(std::thread(&ApiPressureTest::EncryptTest, this, &authId, paramInSet));
1312 (void)HksDeleteKey(&authId, nullptr);
1324 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1343 HksGenerateKey(&authId, paramInSet, NULL);
1350 HksEncrypt(&authId, paramInSet, &plainText, &cipherText);
1354 … std::thread(&ApiPressureTest::DecryptTest, this, &authId, paramInSet, &cipherText, &inLen));
1361 (void)HksDeleteKey(&authId, nullptr);
1374 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1388 HksGenerateKey(&authId, paramInSet, NULL);
1391 threads.emplace_back(std::thread(&ApiPressureTest::AgreeKeyTest, this, &authId));
1398 (void)HksDeleteKey(&authId, nullptr);
1410 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1424 HksGenerateKey(&authId, paramInSet, NULL);
1439 … threads.emplace_back(std::thread(&ApiPressureTest::DeriveKeyTest, this, &authId, paramInSetHkdf));
1446 (void)HksDeleteKey(&authId, nullptr);
1459 struct HksBlob authId = { (uint32_t)strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
1473 HksGenerateKey(&authId, paramInSet, NULL);
1476 threads.emplace_back(std::thread(&ApiPressureTest::MacTest, this, &authId, paramInSet));
1483 (void)HksDeleteKey(&authId, nullptr);