Searched defs:plaintext (Results 1 - 12 of 12) sorted by path

/system/connectivity/shill/
H A Dcrypto_des_cbc.cc42 bool CryptoDESCBC::Encrypt(const string& plaintext, string* ciphertext) { argument
48 bool CryptoDESCBC::Decrypt(const string& ciphertext, string* plaintext) { argument
92 *plaintext = text;
H A Dcrypto_des_cbc_unittest.cc105 string plaintext; local
106 EXPECT_TRUE(crypto_.Decrypt(kEmptyCipher, &plaintext));
107 EXPECT_EQ(kEmptyPlain, plaintext);
108 EXPECT_TRUE(crypto_.Decrypt(kCipherText, &plaintext));
109 EXPECT_EQ(kPlainText, plaintext);
110 EXPECT_TRUE(crypto_.Decrypt(kCipherVersion1, &plaintext));
111 EXPECT_EQ(kPlainVersion1, plaintext);
113 EXPECT_FALSE(crypto_.Decrypt("random", &plaintext));
114 EXPECT_FALSE(crypto_.Decrypt("02:random", &plaintext));
115 EXPECT_FALSE(crypto_.Decrypt("~", &plaintext));
[all...]
H A Dcrypto_provider.cc47 string CryptoProvider::Encrypt(const string& plaintext) { argument
50 if (crypto->Encrypt(plaintext, &ciphertext)) {
56 return plaintext;
65 string plaintext; local
66 if (!crypto->Decrypt(to_decrypt, &plaintext)) {
70 return plaintext;
H A Dcrypto_rot47.cc31 bool CryptoROT47::Encrypt(const string& plaintext, string* ciphertext) { argument
37 *ciphertext = plaintext;
48 bool CryptoROT47::Decrypt(const string& ciphertext, string* plaintext) { argument
50 return Encrypt(ciphertext, plaintext);
/system/keymaster/
H A Dandroid_keymaster_test.cpp1917 string plaintext = DecryptMessage(ciphertext, KM_MODE_ECB, KM_PAD_PKCS7); local
1918 EXPECT_EQ(message, plaintext);
1974 string plaintext = DecryptMessage(ciphertext, KM_PAD_NONE); local
1976 EXPECT_EQ(expected_plaintext, plaintext);
2095 string plaintext = DecryptMessage(ciphertext, KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); local
2096 EXPECT_EQ(message, plaintext);
2112 string plaintext = DecryptMessage(ciphertext, KM_DIGEST_SHA_2_224, KM_PAD_RSA_OAEP); local
2113 EXPECT_EQ(message, plaintext);
2257 string plaintext = DecryptMessage(ciphertext, KM_PAD_RSA_PKCS1_1_5_ENCRYPT); local
2258 EXPECT_EQ(message, plaintext);
2295 string plaintext = DecryptMessage(ciphertext, digest, padding); local
2394 string plaintext = DecryptMessage(ciphertext1, KM_MODE_ECB, KM_PAD_NONE); local
2447 string plaintext = DecryptMessage(ciphertext, KM_MODE_ECB, KM_PAD_PKCS7); local
2488 string plaintext; local
2517 string plaintext = DecryptMessage(ciphertext1, KM_MODE_CTR, KM_PAD_NONE, iv1); local
2553 string plaintext; local
2567 const char* plaintext; member in struct:keymaster::test::AesCtrSp80038aTestVector
2606 const string plaintext = hex2str(test.plaintext); local
2662 string plaintext = DecryptMessage(ciphertext1, KM_MODE_CBC, KM_PAD_NONE, iv1); local
2681 string plaintext = DecryptMessage(ciphertext1, KM_MODE_CBC, KM_PAD_NONE, iv1); local
2724 string plaintext = DecryptMessage(ciphertext1, KM_MODE_CBC, KM_PAD_NONE, iv1); local
2771 string plaintext; local
2794 string plaintext = DecryptMessage(ciphertext, KM_MODE_CBC, KM_PAD_PKCS7, iv); local
2834 string plaintext; local
2927 string plaintext; local
2999 string plaintext; local
3057 string plaintext; local
3120 string plaintext; local
3168 string plaintext; local
3207 string plaintext; local
3254 string plaintext; local
[all...]
H A Dkey_blob_test.cpp117 KeymasterKeyBlob plaintext; local
118 OcbDecryptKey(hw2, sw2, hidden_, master_key_, ciphertext_, nonce_, tag_, &plaintext);
123 ASSERT_EQ(key_material_.key_material_size, plaintext.key_material_size);
124 EXPECT_EQ(0, memcmp(plaintext.begin(), key_material_.begin(), plaintext.key_material_size));
H A Docb_utils.cpp121 const KeymasterKeyBlob& plaintext, const Buffer& nonce,
137 if (!ciphertext->Reset(plaintext.key_material_size))
140 int ae_err = ae_encrypt(ctx.get(), nonce.peek_read(), plaintext.key_material,
141 plaintext.key_material_size, NULL /* additional data */,
150 assert(ae_err == static_cast<int>(plaintext.key_material_size));
158 const Buffer& tag, KeymasterKeyBlob* plaintext) {
159 assert(plaintext);
173 if (!plaintext->Reset(ciphertext.key_material_size))
178 0 /* additional data length */, plaintext->writable_data(),
183 plaintext
118 OcbEncryptKey(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, const AuthorizationSet& hidden, const KeymasterKeyBlob& master_key, const KeymasterKeyBlob& plaintext, const Buffer& nonce, KeymasterKeyBlob* ciphertext, Buffer* tag) argument
154 OcbDecryptKey(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, const AuthorizationSet& hidden, const KeymasterKeyBlob& master_key, const KeymasterKeyBlob& ciphertext, const Buffer& nonce, const Buffer& tag, KeymasterKeyBlob* plaintext) argument
[all...]
/system/tpm/trunks/
H A Dtpm_utility_impl.cc58 std::string HashString(const std::string& plaintext, argument
62 return base::SHA1HashString(plaintext);
64 return crypto::SHA256HashString(plaintext);
412 const std::string& plaintext,
454 TPM2B_PUBLIC_KEY_RSA in_message = Make_TPM2B_PUBLIC_KEY_RSA(plaintext);
477 std::string* plaintext) {
537 plaintext->assign(StringFrom_TPM2B_PUBLIC_KEY_RSA(out_message));
544 const std::string& plaintext,
590 std::string digest = HashString(plaintext, hash_alg);
623 const std::string& plaintext,
409 AsymmetricEncrypt(TPM_HANDLE key_handle, TPM_ALG_ID scheme, TPM_ALG_ID hash_alg, const std::string& plaintext, AuthorizationDelegate* delegate, std::string* ciphertext) argument
472 AsymmetricDecrypt(TPM_HANDLE key_handle, TPM_ALG_ID scheme, TPM_ALG_ID hash_alg, const std::string& ciphertext, AuthorizationDelegate* delegate, std::string* plaintext) argument
541 Sign(TPM_HANDLE key_handle, TPM_ALG_ID scheme, TPM_ALG_ID hash_alg, const std::string& plaintext, AuthorizationDelegate* delegate, std::string* signature) argument
620 Verify(TPM_HANDLE key_handle, TPM_ALG_ID scheme, TPM_ALG_ID hash_alg, const std::string& plaintext, const std::string& signature, AuthorizationDelegate* delegate) argument
[all...]
H A Dtpm_utility_test.cc488 std::string plaintext; local
509 plaintext,
517 std::string plaintext; local
532 plaintext,
539 std::string plaintext; local
550 plaintext,
557 std::string plaintext; local
578 plaintext,
587 std::string plaintext; local
608 plaintext,
616 std::string plaintext; local
647 std::string plaintext; local
671 std::string plaintext; local
691 std::string plaintext; local
701 std::string plaintext; local
733 std::string plaintext; local
[all...]
H A Dtrunks_client_test.cc481 TPM_ALG_NULL, "plaintext",
494 std::string plaintext; local
499 &plaintext);
504 if (plaintext.compare("plaintext") != 0) {
646 "plaintext", nullptr, &ciphertext);
661 std::string plaintext; local
667 &plaintext);
768 "plaintext", nullptr, &ciphertext);
783 std::string plaintext; local
972 std::string plaintext; local
[all...]
/system/weaved/buffet/
H A Dkeystore_encryptor.cc39 bool KeystoreEncryptor::EncryptWithAuthentication(const std::string& plaintext, argument
41 return keystore_->encryptWithAuthentication(kBuffetKeyName, plaintext,
46 std::string* plaintext) {
48 plaintext);
45 DecryptWithAuthentication(const std::string& ciphertext, std::string* plaintext) argument
/system/webservd/webservd/
H A Dkeystore_encryptor.cc39 bool KeystoreEncryptor::EncryptWithAuthentication(const std::string& plaintext, argument
41 return keystore_->encryptWithAuthentication(kWebserverKeyName, plaintext,
46 std::string* plaintext) {
48 plaintext);
45 DecryptWithAuthentication(const std::string& ciphertext, std::string* plaintext) argument

Completed in 185 milliseconds