Lines Matching refs:message

462     string message = "12345678901234567890123456789012";  in TEST_P()  local
464 SignMessage(message, &signature, KM_DIGEST_NONE, KM_PAD_NONE); in TEST_P()
476 string message(1024, 'a'); in TEST_P() local
478 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PSS); in TEST_P()
489 string message = "12345678901234567890123456789012"; in TEST_P() local
506 string message(1024, 'a'); in TEST_P() local
508 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
519 string message(53, 'a'); in TEST_P() local
521 SignMessage(message, &signature, KM_DIGEST_NONE, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
532 string message(54, 'a'); in TEST_P() local
540 EXPECT_EQ(KM_ERROR_INVALID_INPUT_LENGTH, FinishOperation(message, "", &signature)); in TEST_P()
553 string message(1024, 'a'); in TEST_P() local
567 string message(64 * 1024, 'a'); in TEST_P() local
575 EXPECT_EQ(KM_ERROR_INVALID_INPUT_LENGTH, UpdateOperation(message, &result, &input_consumed)); in TEST_P()
643 string message = "1234567890123456789012345678901"; in TEST_P() local
645 SignMessage(message, &signature, KM_DIGEST_NONE, KM_PAD_NONE); in TEST_P()
670 string message(256 / 8, static_cast<char>(0xff)); in TEST_P() local
678 ASSERT_EQ(KM_ERROR_OK, UpdateOperation(message, &result, &input_consumed)); in TEST_P()
679 ASSERT_EQ(message.size(), input_consumed); in TEST_P()
690 string message(224 / 8, 'a'); in TEST_P() local
692 SignMessage(message, &signature, KM_DIGEST_NONE); in TEST_P()
701 string message(1024, 'a'); in TEST_P() local
703 SignMessage(message, &signature, KM_DIGEST_SHA_2_256); in TEST_P()
712 string message(1024, 'a'); in TEST_P() local
714 SignMessage(message, &signature, KM_DIGEST_SHA_2_384); in TEST_P()
723 string message(64 * 1024, 'a'); in TEST_P() local
730 EXPECT_EQ(KM_ERROR_OK, UpdateOperation(message, &result, &input_consumed)); in TEST_P()
749 string message(1024, 'a'); in TEST_P() local
752 message.resize(key_size / 8); in TEST_P()
753 SignMessage(message, &signature, digest); in TEST_P()
777 string message = "12345678901234567890123456789012"; in TEST_P() local
779 MacMessage(message, &signature, 160); in TEST_P()
790 string message = "12345678901234567890123456789012"; in TEST_P() local
792 MacMessage(message, &signature, 224); in TEST_P()
803 string message = "12345678901234567890123456789012"; in TEST_P() local
805 MacMessage(message, &signature, 256); in TEST_P()
817 string message = "12345678901234567890123456789012"; in TEST_P() local
819 MacMessage(message, &signature, 384); in TEST_P()
830 string message = "12345678901234567890123456789012"; in TEST_P() local
832 MacMessage(message, &signature, 512); in TEST_P()
844 string message = "12345678901234567890123456789012"; in TEST_P() local
846 MacMessage(message, &signature, 160); in TEST_P()
854 string message(50, 0xdd); in TEST_P() local
878 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_224, make_string(sha_224_expected)); in TEST_P()
879 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_256, make_string(sha_256_expected)); in TEST_P()
880 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_384, make_string(sha_384_expected)); in TEST_P()
881 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_512, make_string(sha_512_expected)); in TEST_P()
892 string message(50, 0xcd); in TEST_P() local
916 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_224, make_string(sha_224_expected)); in TEST_P()
917 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_256, make_string(sha_256_expected)); in TEST_P()
918 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_384, make_string(sha_384_expected)); in TEST_P()
919 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_512, make_string(sha_512_expected)); in TEST_P()
926 string message = "Test With Truncation"; in TEST_P() local
945 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_224, make_string(sha_224_expected)); in TEST_P()
946 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_256, make_string(sha_256_expected)); in TEST_P()
947 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_384, make_string(sha_384_expected)); in TEST_P()
948 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_512, make_string(sha_512_expected)); in TEST_P()
955 string message = "Test Using Larger Than Block-Size Key - Hash Key First"; in TEST_P() local
980 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_224, make_string(sha_224_expected)); in TEST_P()
981 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_256, make_string(sha_256_expected)); in TEST_P()
982 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_384, make_string(sha_384_expected)); in TEST_P()
983 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_512, make_string(sha_512_expected)); in TEST_P()
990 string message = "This is a test using a larger than block-size key and a larger than " in TEST_P() local
1017 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_224, make_string(sha_224_expected)); in TEST_P()
1018 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_256, make_string(sha_256_expected)); in TEST_P()
1019 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_384, make_string(sha_384_expected)); in TEST_P()
1020 CheckHmacTestVector(key, message, KM_DIGEST_SHA_2_512, make_string(sha_512_expected)); in TEST_P()
1063 string message = "12345678901234567890123456789012"; in TEST_P() local
1065 SignMessage(message, &signature, KM_DIGEST_NONE, KM_PAD_NONE); in TEST_P()
1066 VerifyMessage(message, signature, KM_DIGEST_NONE, KM_PAD_NONE); in TEST_P()
1078 string message(1024, 'a'); in TEST_P() local
1080 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PSS); in TEST_P()
1081 VerifyMessage(message, signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PSS); in TEST_P()
1093 string message(1024, 'a'); in TEST_P() local
1095 SignMessage(message, &signature, KM_DIGEST_SHA_2_224, KM_PAD_RSA_PSS); in TEST_P()
1096 VerifyMessage(message, signature, KM_DIGEST_SHA_2_224, KM_PAD_RSA_PSS); in TEST_P()
1116 EXPECT_EQ(1, EVP_DigestVerifyUpdate(&digest_ctx, message.data(), message.size())); in TEST_P()
1128 string message(1024, 'a'); in TEST_P() local
1130 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PSS); in TEST_P()
1139 EXPECT_EQ(KM_ERROR_VERIFICATION_FAILED, FinishOperation(message, signature, &result)); in TEST_P()
1151 string message(1024, 'a'); in TEST_P() local
1153 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PSS); in TEST_P()
1154 ++message[message.size() / 2]; in TEST_P()
1162 EXPECT_EQ(KM_ERROR_VERIFICATION_FAILED, FinishOperation(message, signature, &result)); in TEST_P()
1173 string message(1024, 'a'); in TEST_P() local
1175 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
1176 VerifyMessage(message, signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
1188 string message(1024, 'a'); in TEST_P() local
1190 SignMessage(message, &signature, KM_DIGEST_SHA_2_224, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
1191 VerifyMessage(message, signature, KM_DIGEST_SHA_2_224, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
1210 EXPECT_EQ(1, EVP_DigestVerifyUpdate(&digest_ctx, message.data(), message.size())); in TEST_P()
1222 string message(1024, 'a'); in TEST_P() local
1224 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
1233 EXPECT_EQ(KM_ERROR_VERIFICATION_FAILED, FinishOperation(message, signature, &result)); in TEST_P()
1245 string message(1024, 'a'); in TEST_P() local
1247 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
1248 ++message[message.size() / 2]; in TEST_P()
1256 EXPECT_EQ(KM_ERROR_VERIFICATION_FAILED, FinishOperation(message, signature, &result)); in TEST_P()
1345 string message(message_len, 'a'); in TEST_P() local
1347 SignMessage(message, &signature, digest, padding_mode); in TEST_P()
1348 VerifyMessage(message, signature, digest, padding_mode); in TEST_P()
1360 string message = "12345678901234567890123456789012"; in TEST_P() local
1362 SignMessage(message, &signature, KM_DIGEST_NONE); in TEST_P()
1363 VerifyMessage(message, signature, KM_DIGEST_NONE); in TEST_P()
1372 string message = "12345678901234567890"; in TEST_P() local
1374 SignMessage(message, &signature, KM_DIGEST_NONE); in TEST_P()
1375 VerifyMessage(message, signature, KM_DIGEST_NONE); in TEST_P()
1385 string message(66, 'a'); in TEST_P() local
1387 SignMessage(message, &signature, KM_DIGEST_NONE); in TEST_P()
1388 VerifyMessage(message, signature, KM_DIGEST_NONE); in TEST_P()
1391 message[65] ^= 7; in TEST_P()
1392 VerifyMessage(message, signature, KM_DIGEST_NONE); in TEST_P()
1403 string message = "12345678901234567890123456789012"; in TEST_P() local
1405 SignMessage(message, &signature, KM_DIGEST_SHA_2_256); in TEST_P()
1406 VerifyMessage(message, signature, KM_DIGEST_SHA_2_256); in TEST_P()
1417 EXPECT_EQ(KM_ERROR_VERIFICATION_FAILED, FinishOperation(message, signature, &result)); in TEST_P()
1424 string message = "12345678901234567890123456789012"; in TEST_P() local
1426 SignMessage(message, &signature, KM_DIGEST_SHA_2_224); in TEST_P()
1427 VerifyMessage(message, signature, KM_DIGEST_SHA_2_224); in TEST_P()
1438 EXPECT_EQ(KM_ERROR_VERIFICATION_FAILED, FinishOperation(message, signature, &result)); in TEST_P()
1448 string message = "1234567890"; in TEST_P() local
1461 SignMessage(message, &signature, digest); in TEST_P()
1462 VerifyMessage(message, signature, digest); in TEST_P()
1476 string message = "123456789012345678901234567890123456789012345678"; in TEST_P() local
1478 MacMessage(message, &signature, 160); in TEST_P()
1479 VerifyMac(message, signature); in TEST_P()
1489 string message = "123456789012345678901234567890123456789012345678"; in TEST_P() local
1491 MacMessage(message, &signature, 224); in TEST_P()
1492 VerifyMac(message, signature); in TEST_P()
1502 string message = "123456789012345678901234567890123456789012345678"; in TEST_P() local
1504 MacMessage(message, &signature, 256); in TEST_P()
1505 VerifyMac(message, signature); in TEST_P()
1515 string message = "123456789012345678901234567890123456789012345678"; in TEST_P() local
1517 MacMessage(message, &signature, 256); in TEST_P()
1521 VerifyMac(message, signature); in TEST_P()
1529 EXPECT_EQ(KM_ERROR_INVALID_MAC_LENGTH, FinishOperation(message, signature, &result)); in TEST_P()
1539 string message = "123456789012345678901234567890123456789012345678"; in TEST_P() local
1541 MacMessage(message, &signature, 384); in TEST_P()
1542 VerifyMac(message, signature); in TEST_P()
1552 string message = "123456789012345678901234567890123456789012345678"; in TEST_P() local
1554 MacMessage(message, &signature, 512); in TEST_P()
1555 VerifyMac(message, signature); in TEST_P()
1665 string message(1024 / 8, 'a'); in TEST_P() local
1667 SignMessage(message, &signature, KM_DIGEST_NONE, KM_PAD_NONE); in TEST_P()
1668 VerifyMessage(message, signature, KM_DIGEST_NONE, KM_PAD_NONE); in TEST_P()
1723 string message(32, 'a'); in TEST_P() local
1725 SignMessage(message, &signature, KM_DIGEST_NONE); in TEST_P()
1726 VerifyMessage(message, signature, KM_DIGEST_NONE); in TEST_P()
1755 string message(32, 'a'); in TEST_P() local
1757 SignMessage(message, &signature, KM_DIGEST_NONE); in TEST_P()
1758 VerifyMessage(message, signature, KM_DIGEST_NONE); in TEST_P()
1787 string message = "Hello World!"; in TEST_P() local
1788 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); in TEST_P()
1790 EXPECT_EQ(message, plaintext); in TEST_P()
1807 string message = "Hello World!"; in TEST_P() local
1809 MacMessage(message, &signature, 256); in TEST_P()
1810 VerifyMac(message, signature); in TEST_P()
1911 string ProcessMessage(keymaster_purpose_t purpose, const string& message, in ProcessMessage() argument
1916 EXPECT_EQ(KM_ERROR_OK, FinishOperation(message, &result)); in ProcessMessage()
1962 string message = "Hello World!"; in TEST_F() local
1964 string ciphertext = ProcessMessage(KM_PURPOSE_ENCRYPT, message, params); in TEST_F()
1967 EXPECT_EQ(message, plaintext); in TEST_F()
2069 string message = "12345678901234567890123456789012"; in TEST_P() local
2070 string ciphertext1 = EncryptMessage(string(message), KM_PAD_NONE); in TEST_P()
2073 string ciphertext2 = EncryptMessage(string(message), KM_PAD_NONE); in TEST_P()
2087 string message = "1"; in TEST_P() local
2089 string ciphertext = EncryptMessage(message, KM_PAD_NONE); in TEST_P()
2092 string expected_plaintext = string(256 / 8 - 1, 0) + message; in TEST_P()
2105 string message = "123456789012345678901234567890123"; in TEST_P() local
2113 EXPECT_EQ(KM_ERROR_INVALID_INPUT_LENGTH, UpdateOperation(message, &result, &input_consumed)); in TEST_P()
2137 string message(reinterpret_cast<const char*>(modulus_buf.get()), modulus_len); in TEST_P()
2145 EXPECT_EQ(KM_ERROR_OK, UpdateOperation(message, &result, &input_consumed)); in TEST_P()
2153 message = string(reinterpret_cast<const char*>(modulus_buf.get()), modulus_len); in TEST_P()
2155 EXPECT_EQ(KM_ERROR_OK, FinishOperation(message, "", &result)); in TEST_P()
2168 string message = "Hello"; in TEST_P() local
2169 string ciphertext1 = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); in TEST_P()
2172 string ciphertext2 = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); in TEST_P()
2189 string message = "Hello"; in TEST_P() local
2190 string ciphertext1 = EncryptMessage(string(message), KM_DIGEST_SHA_2_224, KM_PAD_RSA_OAEP); in TEST_P()
2193 string ciphertext2 = EncryptMessage(string(message), KM_DIGEST_SHA_2_224, KM_PAD_RSA_OAEP); in TEST_P()
2209 string message = "Hello World!"; in TEST_P() local
2210 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); in TEST_P()
2214 EXPECT_EQ(message, plaintext); in TEST_P()
2226 string message = "Hello World!"; in TEST_P() local
2227 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_224, KM_PAD_RSA_OAEP); in TEST_P()
2231 EXPECT_EQ(message, plaintext); in TEST_P()
2242 string message = "Hello World!"; in TEST_P() local
2262 string message = "Hello World!"; in TEST_P() local
2264 EncryptMessage(string(message), KM_DIGEST_SHA1, KM_PAD_RSA_OAEP); in TEST_P()
2286 string message = "Hello World!"; in TEST_P() local
2287 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); in TEST_P()
2308 string message = "12345678901234567890123"; in TEST_P() local
2316 EXPECT_EQ(KM_ERROR_OK, UpdateOperation(message, &result, &input_consumed)); in TEST_P()
2330 string message = "Hello World!"; in TEST_P() local
2331 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); in TEST_P()
2354 string message = "Hello World!"; in TEST_P() local
2355 string ciphertext1 = EncryptMessage(message, KM_PAD_RSA_PKCS1_1_5_ENCRYPT); in TEST_P()
2358 string ciphertext2 = EncryptMessage(message, KM_PAD_RSA_PKCS1_1_5_ENCRYPT); in TEST_P()
2371 string message = "Hello World!"; in TEST_P() local
2372 string ciphertext = EncryptMessage(message, KM_PAD_RSA_PKCS1_1_5_ENCRYPT); in TEST_P()
2376 EXPECT_EQ(message, plaintext); in TEST_P()
2396 string message = "Hello World!"; in TEST_P() local
2410 string ciphertext = EncryptMessage(message, digest, padding); in TEST_P()
2414 EXPECT_EQ(message, plaintext); in TEST_P()
2424 string message = "123456789012345678901234567890123456789012345678901234"; in TEST_P() local
2431 EXPECT_EQ(KM_ERROR_OK, UpdateOperation(message, &result, &input_consumed)); in TEST_P()
2442 string message = "Hello World!"; in TEST_P() local
2443 string ciphertext = EncryptMessage(string(message), KM_PAD_RSA_PKCS1_1_5_ENCRYPT); in TEST_P()
2502 string message = "12345678901234567890123456789012"; in TEST_P() local
2503 string ciphertext1 = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
2504 EXPECT_EQ(message.size(), ciphertext1.size()); in TEST_P()
2506 string ciphertext2 = EncryptMessage(string(message), KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
2507 EXPECT_EQ(message.size(), ciphertext2.size()); in TEST_P()
2513 EXPECT_EQ(message, plaintext); in TEST_P()
2524 string message = "12345678901234567890123456789012"; in TEST_P() local
2539 string message = "1234567890123456789012345678901"; in TEST_P() local
2546 EXPECT_EQ(KM_ERROR_INVALID_INPUT_LENGTH, FinishOperation(message, "", &ciphertext)); in TEST_P()
2559 string message(i, 'a'); in TEST_P() local
2560 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); in TEST_P()
2563 EXPECT_EQ(message, plaintext); in TEST_P()
2593 string message = "a"; in TEST_P() local
2594 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); in TEST_P()
2596 EXPECT_NE(ciphertext, message); in TEST_P()
2617 string message = "123"; in TEST_P() local
2619 string ciphertext1 = EncryptMessage(message, KM_MODE_CTR, KM_PAD_NONE, &iv1); in TEST_P()
2620 EXPECT_EQ(message.size(), ciphertext1.size()); in TEST_P()
2624 string ciphertext2 = EncryptMessage(message, KM_MODE_CTR, KM_PAD_NONE, &iv2); in TEST_P()
2625 EXPECT_EQ(message.size(), ciphertext2.size()); in TEST_P()
2633 EXPECT_EQ(message, plaintext); in TEST_P()
2645 string message(239, 'a'); in TEST_P() local
2654 for (size_t i = 0; i < message.size(); i += increment) in TEST_P()
2656 UpdateOperation(message.substr(i, increment), &ciphertext, &input_consumed)); in TEST_P()
2658 EXPECT_EQ(message.size(), ciphertext.size()); in TEST_P()
2674 EXPECT_EQ(message, plaintext); in TEST_P()
2764 string message = "12345678901234567890123456789012"; in TEST_P() local
2766 string ciphertext1 = EncryptMessage(message, KM_MODE_CBC, KM_PAD_NONE, &iv1); in TEST_P()
2767 EXPECT_EQ(message.size(), ciphertext1.size()); in TEST_P()
2770 string ciphertext2 = EncryptMessage(message, KM_MODE_CBC, KM_PAD_NONE, &iv2); in TEST_P()
2771 EXPECT_EQ(message.size(), ciphertext2.size()); in TEST_P()
2778 EXPECT_EQ(message, plaintext); in TEST_P()
2789 string message = "12345678901234567890123456789012"; in TEST_P() local
2792 string ciphertext1 = EncryptMessage(message, KM_MODE_CBC, KM_PAD_NONE, &iv1); in TEST_P()
2793 EXPECT_EQ(message.size(), ciphertext1.size()); in TEST_P()
2797 EXPECT_EQ(message, plaintext); in TEST_P()
2807 ProcessMessage(KM_PURPOSE_ENCRYPT, message, input_params, update_params, &output_params); in TEST_P()
2812 EXPECT_EQ(message, plaintext); in TEST_P()
2821 EXPECT_NE(message, plaintext); in TEST_P()
2832 string message = "12345678901234567890123456789012"; in TEST_P() local
2835 string ciphertext1 = EncryptMessage(message, KM_MODE_CBC, KM_PAD_NONE, &iv1); in TEST_P()
2836 EXPECT_EQ(message.size(), ciphertext1.size()); in TEST_P()
2840 EXPECT_EQ(message, plaintext); in TEST_P()
2863 string message(240, 'a'); in TEST_P() local
2872 for (size_t i = 0; i < message.size(); i += increment) in TEST_P()
2874 UpdateOperation(message.substr(i, increment), &ciphertext, &input_consumed)); in TEST_P()
2876 EXPECT_EQ(message.size(), ciphertext.size()); in TEST_P()
2892 EXPECT_EQ(message, plaintext); in TEST_P()
2905 string message(i, 'a'); in TEST_P() local
2907 string ciphertext = EncryptMessage(message, KM_MODE_CBC, KM_PAD_PKCS7, &iv); in TEST_P()
2910 EXPECT_EQ(message, plaintext); in TEST_P()
2923 string message = "123456789012345678901234567890123456"; in TEST_P() local
2938 EXPECT_EQ(KM_ERROR_OK, UpdateOperation(update_params, message, &update_out_params, &ciphertext, in TEST_P()
2940 EXPECT_EQ(message.size(), input_consumed); in TEST_P()
2955 EXPECT_EQ(message, plaintext); in TEST_P()
2966 string message = "123456789012345678901234567890123456"; in TEST_P() local
2989 string message = "123456789012345678901234567890123456"; in TEST_P() local
3004 EXPECT_EQ(KM_ERROR_OK, UpdateOperation(update_params, message, &update_out_params, &ciphertext, in TEST_P()
3006 EXPECT_EQ(message.size(), input_consumed); in TEST_P()
3200 string message = "123456789012345678901234567890123456"; in TEST_P() local
3221 EXPECT_EQ(KM_ERROR_OK, UpdateOperation(update_params, message, &update_out_params, &ciphertext, in TEST_P()
3223 EXPECT_EQ(message.size(), input_consumed); in TEST_P()
3241 EXPECT_EQ(message, plaintext); in TEST_P()
3251 string message = "12345678901234567890123456789012"; in TEST_P() local
3269 EXPECT_EQ(KM_ERROR_OK, UpdateOperation(update_params, message, &update_out_params, &ciphertext, in TEST_P()
3271 EXPECT_EQ(message.size(), input_consumed); in TEST_P()
3298 string message = "12345678901234567890123456789012"; in TEST_P() local
3313 EXPECT_EQ(KM_ERROR_OK, UpdateOperation(update_params, message, &update_out_params, &ciphertext, in TEST_P()
3315 EXPECT_EQ(message.size(), input_consumed); in TEST_P()
3329 EXPECT_NE(message, plaintext); in TEST_P()
3340 string message = "123456789012345678901234567890123456"; in TEST_P() local
3355 EXPECT_EQ(KM_ERROR_OK, UpdateOperation(update_params, message, &update_out_params, &ciphertext, in TEST_P()
3357 EXPECT_EQ(message.size(), input_consumed); in TEST_P()
3375 EXPECT_EQ(message, plaintext); in TEST_P()
3387 string message = "1234567890123456"; in TEST_P() local
3388 string ciphertext1 = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
3389 EXPECT_EQ(message.size(), ciphertext1.size()); in TEST_P()
3391 string ciphertext2 = EncryptMessage(string(message), KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
3392 EXPECT_EQ(message.size(), ciphertext2.size()); in TEST_P()
3398 EXPECT_EQ(message, plaintext); in TEST_P()
3407 string message = "1234567890123456"; in TEST_P() local
3420 string message = "123456789012345"; in TEST_P() local
3427 EXPECT_EQ(KM_ERROR_INVALID_INPUT_LENGTH, FinishOperation(message, "", &ciphertext)); in TEST_P()
3438 string message(i, 'a'); in TEST_P() local
3439 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); in TEST_P()
3442 EXPECT_EQ(message, plaintext); in TEST_P()
3468 string message = "a"; in TEST_P() local
3469 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); in TEST_P()
3471 EXPECT_NE(ciphertext, message); in TEST_P()
3656 string message = "1234567890123456"; in TEST_P() local
3658 string ciphertext1 = EncryptMessage(message, KM_MODE_CBC, KM_PAD_NONE, &iv1); in TEST_P()
3659 EXPECT_EQ(message.size(), ciphertext1.size()); in TEST_P()
3662 string ciphertext2 = EncryptMessage(message, KM_MODE_CBC, KM_PAD_NONE, &iv2); in TEST_P()
3663 EXPECT_EQ(message.size(), ciphertext2.size()); in TEST_P()
3670 EXPECT_EQ(message, plaintext); in TEST_P()
3681 string message = "1234567890123456"; in TEST_P() local
3684 string ciphertext1 = EncryptMessage(message, KM_MODE_CBC, KM_PAD_NONE, &iv1); in TEST_P()
3685 EXPECT_EQ(message.size(), ciphertext1.size()); in TEST_P()
3689 EXPECT_EQ(message, plaintext); in TEST_P()
3699 ProcessMessage(KM_PURPOSE_ENCRYPT, message, input_params, update_params, &output_params); in TEST_P()
3704 EXPECT_EQ(message, plaintext); in TEST_P()
3713 EXPECT_NE(message, plaintext); in TEST_P()
3722 string message = "12345678901234567890123456789012"; in TEST_P() local
3725 string ciphertext1 = EncryptMessage(message, KM_MODE_CBC, KM_PAD_NONE, &iv1); in TEST_P()
3726 EXPECT_EQ(message.size(), ciphertext1.size()); in TEST_P()
3730 EXPECT_EQ(message, plaintext); in TEST_P()
3750 string message = "1234567890123456"; in TEST_P() local
3763 string message = "123456789012345"; in TEST_P() local
3771 EXPECT_EQ(KM_ERROR_INVALID_INPUT_LENGTH, FinishOperation(message, "", &ciphertext)); in TEST_P()
3782 string message(i, 'a'); in TEST_P() local
3784 string ciphertext = EncryptMessage(message, KM_MODE_CBC, KM_PAD_PKCS7, &iv); in TEST_P()
3787 EXPECT_EQ(message, plaintext); in TEST_P()
3813 string message = "a"; in TEST_P() local
3815 string ciphertext = EncryptMessage(message, KM_MODE_CBC, KM_PAD_PKCS7, &iv); in TEST_P()
3817 EXPECT_NE(ciphertext, message); in TEST_P()
3839 string message(240, 'a'); in TEST_P() local
3848 for (size_t i = 0; i < message.size(); i += increment) in TEST_P()
3850 UpdateOperation(message.substr(i, increment), &ciphertext, &input_consumed)); in TEST_P()
3852 EXPECT_EQ(message.size(), ciphertext.size()); in TEST_P()
3868 EXPECT_EQ(message, plaintext); in TEST_P()
3883 string message = "1234567890123456"; in TEST_P() local
3884 string ciphertext1 = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
3885 string ciphertext2 = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
3886 string ciphertext3 = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
3904 string message = "1234567890123456"; in TEST_P() local
3905 string ciphertext1 = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
3906 string ciphertext2 = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
3907 string ciphertext3 = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
4124 string message = "1234567890123456"; in TEST_P() local
4125 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
4126 EXPECT_EQ(message, DecryptMessage(ciphertext, KM_MODE_ECB, KM_PAD_NONE)); in TEST_P()
4149 ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); in TEST_P()
4150 EXPECT_EQ(message, DecryptMessage(ciphertext, KM_MODE_ECB, KM_PAD_NONE)); in TEST_P()
4170 string message = "12345678901234567890123456789012"; in TEST_P() local
4171 string ciphertext = EncryptMessage(message, KM_PAD_NONE); in TEST_P()
4172 EXPECT_EQ(message, DecryptMessage(ciphertext, KM_PAD_NONE)); in TEST_P()
4194 ciphertext = EncryptMessage(message, KM_PAD_NONE); in TEST_P()
4195 EXPECT_EQ(message, DecryptMessage(ciphertext, KM_PAD_NONE)); in TEST_P()
4216 string message = "1234567890123456"; in TEST_P() local
4218 SignMessage(message, &signature, KM_DIGEST_SHA_2_256); in TEST_P()
4219 VerifyMessage(message, signature, KM_DIGEST_SHA_2_256); in TEST_P()
4241 SignMessage(message, &signature, KM_DIGEST_SHA_2_256); in TEST_P()
4242 VerifyMessage(message, signature, KM_DIGEST_SHA_2_256); in TEST_P()