Home
last modified time | relevance | path

Searched refs:plaintext (Results 1 – 25 of 33) sorted by relevance

12

/system/connectivity/shill/
Dcrypto_des_cbc_unittest.cc105 string plaintext; in TEST_F() local
106 EXPECT_TRUE(crypto_.Decrypt(kEmptyCipher, &plaintext)); in TEST_F()
107 EXPECT_EQ(kEmptyPlain, plaintext); in TEST_F()
108 EXPECT_TRUE(crypto_.Decrypt(kCipherText, &plaintext)); in TEST_F()
109 EXPECT_EQ(kPlainText, plaintext); in TEST_F()
110 EXPECT_TRUE(crypto_.Decrypt(kCipherVersion1, &plaintext)); in TEST_F()
111 EXPECT_EQ(kPlainVersion1, plaintext); in TEST_F()
113 EXPECT_FALSE(crypto_.Decrypt("random", &plaintext)); in TEST_F()
114 EXPECT_FALSE(crypto_.Decrypt("02:random", &plaintext)); in TEST_F()
115 EXPECT_FALSE(crypto_.Decrypt("~", &plaintext)); in TEST_F()
[all …]
Dcrypto_provider.cc47 string CryptoProvider::Encrypt(const string& plaintext) { in Encrypt() argument
50 if (crypto->Encrypt(plaintext, &ciphertext)) { in Encrypt()
56 return plaintext; in Encrypt()
65 string plaintext; in Decrypt() local
66 if (!crypto->Decrypt(to_decrypt, &plaintext)) { in Decrypt()
70 return plaintext; in Decrypt()
Dcrypto_rot47.cc31 bool CryptoROT47::Encrypt(const string& plaintext, string* ciphertext) { in Encrypt() argument
37 *ciphertext = plaintext; in Encrypt()
48 bool CryptoROT47::Decrypt(const string& ciphertext, string* plaintext) { in Decrypt() argument
50 return Encrypt(ciphertext, plaintext); in Decrypt()
Dcrypto_interface.h33 virtual bool Encrypt(const std::string& plaintext,
38 std::string* plaintext) = 0;
Dcrypto_rot47.h37 virtual bool Encrypt(const std::string& plaintext, std::string* ciphertext);
38 virtual bool Decrypt(const std::string& ciphertext, std::string* plaintext);
Dcrypto_des_cbc.h50 virtual bool Encrypt(const std::string& plaintext, std::string* ciphertext);
51 virtual bool Decrypt(const std::string& ciphertext, std::string* plaintext);
Dcrypto_des_cbc.cc42 bool CryptoDESCBC::Encrypt(const string& plaintext, string* ciphertext) { in Encrypt() argument
48 bool CryptoDESCBC::Decrypt(const string& ciphertext, string* plaintext) { in Decrypt() argument
92 *plaintext = text; in Decrypt()
Dcrypto_provider.h39 std::string Encrypt(const std::string& plaintext);
/system/weaved/buffet/
Dfake_encryptor.cc25 bool EncryptWithAuthentication(const std::string& plaintext, in EncryptWithAuthentication() argument
27 *ciphertext = brillo::data_encoding::Base64Encode(plaintext); in EncryptWithAuthentication()
32 std::string* plaintext) override { in DecryptWithAuthentication() argument
33 return brillo::data_encoding::Base64Decode(ciphertext, plaintext); in DecryptWithAuthentication()
Dkeystore_encryptor.cc39 bool KeystoreEncryptor::EncryptWithAuthentication(const std::string& plaintext, in EncryptWithAuthentication() argument
41 return keystore_->encryptWithAuthentication(kBuffetKeyName, plaintext, in EncryptWithAuthentication()
46 std::string* plaintext) { in DecryptWithAuthentication() argument
48 plaintext); in DecryptWithAuthentication()
Dencryptor.h33 virtual bool EncryptWithAuthentication(const std::string& plaintext,
39 std::string* plaintext) = 0;
Dkeystore_encryptor.h35 bool EncryptWithAuthentication(const std::string& plaintext,
38 std::string* plaintext) override;
Dbuffet_config_unittest.cc93 bool EncryptWithAuthentication(const std::string& plaintext, in EncryptWithAuthentication() argument
95 *ciphertext = brillo::data_encoding::Base64Encode(plaintext); in EncryptWithAuthentication()
99 std::string* plaintext) override { in DecryptWithAuthentication() argument
101 brillo::data_encoding::Base64Decode(ciphertext, plaintext); in DecryptWithAuthentication()
/system/webservd/webservd/
Dfake_encryptor.cc25 bool EncryptWithAuthentication(const std::string& plaintext, in EncryptWithAuthentication() argument
27 *ciphertext = brillo::data_encoding::Base64Encode(plaintext); in EncryptWithAuthentication()
32 std::string* plaintext) override { in DecryptWithAuthentication() argument
33 return brillo::data_encoding::Base64Decode(ciphertext, plaintext); in DecryptWithAuthentication()
Dkeystore_encryptor.cc39 bool KeystoreEncryptor::EncryptWithAuthentication(const std::string& plaintext, in EncryptWithAuthentication() argument
41 return keystore_->encryptWithAuthentication(kWebserverKeyName, plaintext, in EncryptWithAuthentication()
46 std::string* plaintext) { in DecryptWithAuthentication() argument
48 plaintext); in DecryptWithAuthentication()
Dfake_encryptor.h28 bool EncryptWithAuthentication(const std::string& plaintext,
32 std::string* plaintext) override;
Dencryptor.h30 virtual bool EncryptWithAuthentication(const std::string& plaintext,
36 std::string* plaintext) = 0;
Dkeystore_encryptor.h35 bool EncryptWithAuthentication(const std::string& plaintext,
38 std::string* plaintext) override;
/system/keymaster/
Docb_utils.cpp121 const KeymasterKeyBlob& plaintext, const Buffer& nonce, in OcbEncryptKey() argument
137 if (!ciphertext->Reset(plaintext.key_material_size)) in OcbEncryptKey()
140 int ae_err = ae_encrypt(ctx.get(), nonce.peek_read(), plaintext.key_material, in OcbEncryptKey()
141 plaintext.key_material_size, NULL /* additional data */, in OcbEncryptKey()
150 assert(ae_err == static_cast<int>(plaintext.key_material_size)); in OcbEncryptKey()
158 const Buffer& tag, KeymasterKeyBlob* plaintext) { in OcbDecryptKey() argument
159 assert(plaintext); in OcbDecryptKey()
173 if (!plaintext->Reset(ciphertext.key_material_size)) in OcbDecryptKey()
178 0 /* additional data length */, plaintext->writable_data(), in OcbDecryptKey()
183 plaintext->Clear(); in OcbDecryptKey()
Docb_utils.h37 const KeymasterKeyBlob& plaintext, const Buffer& nonce,
44 const Buffer& tag, KeymasterKeyBlob* plaintext);
Dandroid_keymaster_test.cpp1917 string plaintext = DecryptMessage(ciphertext, KM_MODE_ECB, KM_PAD_PKCS7); in TEST_P() local
1918 EXPECT_EQ(message, plaintext); in TEST_P()
1974 string plaintext = DecryptMessage(ciphertext, KM_PAD_NONE); in TEST_P() local
1976 EXPECT_EQ(expected_plaintext, plaintext); in TEST_P()
2095 string plaintext = DecryptMessage(ciphertext, KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); in TEST_P() local
2096 EXPECT_EQ(message, plaintext); in TEST_P()
2112 string plaintext = DecryptMessage(ciphertext, KM_DIGEST_SHA_2_224, KM_PAD_RSA_OAEP); in TEST_P() local
2113 EXPECT_EQ(message, plaintext); in TEST_P()
2257 string plaintext = DecryptMessage(ciphertext, KM_PAD_RSA_PKCS1_1_5_ENCRYPT); in TEST_P() local
2258 EXPECT_EQ(message, plaintext); in TEST_P()
[all …]
Dkey_blob_test.cpp117 KeymasterKeyBlob plaintext; in TEST_F() local
118 OcbDecryptKey(hw2, sw2, hidden_, master_key_, ciphertext_, nonce_, tag_, &plaintext); in TEST_F()
123 ASSERT_EQ(key_material_.key_material_size, plaintext.key_material_size); in TEST_F()
124 EXPECT_EQ(0, memcmp(plaintext.begin(), key_material_.begin(), plaintext.key_material_size)); in TEST_F()
/system/tpm/trunks/
Dtpm_utility.h113 const std::string& plaintext,
127 std::string* plaintext) = 0;
139 const std::string& plaintext,
153 const std::string& plaintext,
Dtpm_utility_impl.h63 const std::string& plaintext,
71 std::string* plaintext) override;
75 const std::string& plaintext,
81 const std::string& plaintext,
Dtrunks_factory_for_test.cc177 const std::string& plaintext, in AsymmetricEncrypt() argument
183 plaintext, in AsymmetricEncrypt()
193 std::string* plaintext) override { in AsymmetricDecrypt() argument
199 plaintext); in AsymmetricDecrypt()
205 const std::string& plaintext, in Sign() argument
211 plaintext, in Sign()
219 const std::string& plaintext, in Verify() argument
223 plaintext, signature, delegate); in Verify()

12