Home
last modified time | relevance | path

Searched refs:ciphertext (Results 1 – 25 of 32) sorted by relevance

12

/system/connectivity/shill/
Dcrypto_provider.cc49 string ciphertext; in Encrypt() local
50 if (crypto->Encrypt(plaintext, &ciphertext)) { in Encrypt()
52 return prefix + ciphertext; in Encrypt()
59 string CryptoProvider::Decrypt(const string& ciphertext) { in Decrypt() argument
62 if (base::StartsWith(ciphertext, prefix, base::CompareCase::SENSITIVE)) { in Decrypt()
63 string to_decrypt = ciphertext; in Decrypt()
74 return ciphertext; in Decrypt()
Dcrypto_rot47.cc31 bool CryptoROT47::Encrypt(const string& plaintext, string* ciphertext) { in Encrypt() argument
37 *ciphertext = plaintext; in Encrypt()
38 for (auto& ch : *ciphertext) { in Encrypt()
48 bool CryptoROT47::Decrypt(const string& ciphertext, string* plaintext) { in Decrypt() argument
50 return Encrypt(ciphertext, plaintext); in Decrypt()
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
52 string b64_ciphertext = ciphertext; in Decrypt()
53 if (base::StartsWith(ciphertext, kVersion2Prefix, in Decrypt()
Dcrypto_interface.h34 std::string* ciphertext) = 0;
37 virtual bool Decrypt(const std::string& ciphertext,
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_provider.h44 std::string Decrypt(const std::string& ciphertext);
Dcrypto_des_cbc_unittest.cc97 string ciphertext; in TEST_F() local
98 EXPECT_FALSE(crypto_.Encrypt(kPlainText, &ciphertext)); in TEST_F()
/system/weaved/buffet/
Dfake_encryptor.cc26 std::string* ciphertext) override { in EncryptWithAuthentication() argument
27 *ciphertext = brillo::data_encoding::Base64Encode(plaintext); in EncryptWithAuthentication()
31 bool DecryptWithAuthentication(const std::string& ciphertext, in DecryptWithAuthentication() argument
33 return brillo::data_encoding::Base64Decode(ciphertext, plaintext); in DecryptWithAuthentication()
Dkeystore_encryptor.cc40 std::string* ciphertext) { in EncryptWithAuthentication() argument
42 ciphertext); in EncryptWithAuthentication()
45 bool KeystoreEncryptor::DecryptWithAuthentication(const std::string& ciphertext, in DecryptWithAuthentication() argument
47 return keystore_->decryptWithAuthentication(kBuffetKeyName, ciphertext, in DecryptWithAuthentication()
Dencryptor.h34 std::string* ciphertext) = 0;
38 virtual bool DecryptWithAuthentication(const std::string& ciphertext,
Dkeystore_encryptor.h36 std::string* ciphertext) override;
37 bool DecryptWithAuthentication(const std::string& ciphertext,
Dbuffet_config_unittest.cc94 std::string* ciphertext) override { in EncryptWithAuthentication() argument
95 *ciphertext = brillo::data_encoding::Base64Encode(plaintext); in EncryptWithAuthentication()
98 bool DecryptWithAuthentication(const std::string& ciphertext, in DecryptWithAuthentication() argument
101 brillo::data_encoding::Base64Decode(ciphertext, plaintext); in DecryptWithAuthentication()
/system/webservd/webservd/
Dfake_encryptor.cc26 std::string* ciphertext) override { in EncryptWithAuthentication() argument
27 *ciphertext = brillo::data_encoding::Base64Encode(plaintext); in EncryptWithAuthentication()
31 bool DecryptWithAuthentication(const std::string& ciphertext, in DecryptWithAuthentication() argument
33 return brillo::data_encoding::Base64Decode(ciphertext, plaintext); in DecryptWithAuthentication()
Dkeystore_encryptor.cc40 std::string* ciphertext) { in EncryptWithAuthentication() argument
42 ciphertext); in EncryptWithAuthentication()
45 bool KeystoreEncryptor::DecryptWithAuthentication(const std::string& ciphertext, in DecryptWithAuthentication() argument
47 return keystore_->decryptWithAuthentication(kWebserverKeyName, ciphertext, in DecryptWithAuthentication()
Dfake_encryptor.h29 std::string* ciphertext) override;
31 bool DecryptWithAuthentication(const std::string& ciphertext,
Dencryptor.h31 std::string* ciphertext) = 0;
35 virtual bool DecryptWithAuthentication(const std::string& ciphertext,
Dkeystore_encryptor.h36 std::string* ciphertext) override;
37 bool DecryptWithAuthentication(const std::string& ciphertext,
/system/keymaster/
Docb_utils.cpp122 KeymasterKeyBlob* ciphertext, Buffer* tag) { in OcbEncryptKey() argument
123 assert(ciphertext && tag); in OcbEncryptKey()
137 if (!ciphertext->Reset(plaintext.key_material_size)) in OcbEncryptKey()
142 0 /* additional data length */, ciphertext->writable_data(), in OcbEncryptKey()
157 const KeymasterKeyBlob& ciphertext, const Buffer& nonce, in OcbDecryptKey() argument
173 if (!plaintext->Reset(ciphertext.key_material_size)) in OcbDecryptKey()
176 int ae_err = ae_decrypt(ctx.get(), nonce.peek_read(), ciphertext.key_material, in OcbDecryptKey()
177 ciphertext.key_material_size, NULL /* additional data */, in OcbDecryptKey()
190 assert(ae_err == static_cast<int>(ciphertext.key_material_size)); in OcbDecryptKey()
Dandroid_keymaster_test.cpp1916 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); in TEST_P() local
1917 string plaintext = DecryptMessage(ciphertext, KM_MODE_ECB, KM_PAD_PKCS7); in TEST_P()
1970 string ciphertext = EncryptMessage(message, KM_PAD_NONE); in TEST_P() local
1971 EXPECT_EQ(256U / 8, ciphertext.size()); in TEST_P()
1974 string plaintext = DecryptMessage(ciphertext, KM_PAD_NONE); in TEST_P()
2092 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); in TEST_P() local
2093 EXPECT_EQ(key_size / 8, ciphertext.size()); in TEST_P()
2095 string plaintext = DecryptMessage(ciphertext, KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); in TEST_P()
2109 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_224, KM_PAD_RSA_OAEP); in TEST_P() local
2110 EXPECT_EQ(key_size / 8, ciphertext.size()); in TEST_P()
[all …]
Docb_utils.h38 KeymasterKeyBlob* ciphertext, Buffer* tag);
43 const KeymasterKeyBlob& ciphertext, const Buffer& nonce,
Dandroid_keymaster_test_utils.cpp475 string ciphertext = in EncryptMessage() local
484 return ciphertext; in EncryptMessage()
506 string ciphertext = in EncryptMessage() local
515 return ciphertext; in EncryptMessage()
525 string ciphertext = in EncryptMessage() local
534 return ciphertext; in EncryptMessage()
545 string Keymaster2Test::DecryptMessage(const string& ciphertext, keymaster_padding_t padding) { in DecryptMessage() argument
550 return ProcessMessage(KM_PURPOSE_DECRYPT, ciphertext, begin_params, update_params); in DecryptMessage()
553 string Keymaster2Test::DecryptMessage(const string& ciphertext, keymaster_digest_t digest, in DecryptMessage() argument
560 return ProcessMessage(KM_PURPOSE_DECRYPT, ciphertext, begin_params, update_params); in DecryptMessage()
[all …]
Dandroid_keymaster_test_utils.h261 std::string DecryptMessage(const std::string& ciphertext, keymaster_padding_t padding);
262 std::string DecryptMessage(const std::string& ciphertext, keymaster_digest_t digest,
264 std::string DecryptMessage(const std::string& ciphertext, keymaster_block_mode_t block_mode,
266 std::string DecryptMessage(const std::string& ciphertext, keymaster_digest_t digest,
268 std::string DecryptMessage(const std::string& ciphertext, keymaster_block_mode_t block_mode,
270 std::string DecryptMessage(const AuthorizationSet& update_params, const std::string& ciphertext,
273 std::string DecryptMessage(const AuthorizationSet& update_params, const std::string& ciphertext,
/system/vold/
DKeyStorage.cpp141 const std::string& message, std::string* ciphertext) { in encryptWithKeymasterKey() argument
160 *ciphertext = nonce + body + mac; in encryptWithKeymasterKey()
166 const std::string& ciphertext, std::string* message) { in decryptWithKeymasterKey() argument
167 auto nonce = ciphertext.substr(0, GCM_NONCE_BYTES); in decryptWithKeymasterKey()
168 auto bodyAndMac = ciphertext.substr(GCM_NONCE_BYTES); in decryptWithKeymasterKey()
/system/tpm/trunks/
Dtrunks_client_test.cc479 std::string ciphertext; in PolicyAuthValueTest() local
483 &ciphertext); in PolicyAuthValueTest()
497 TPM_ALG_NULL, ciphertext, in PolicyAuthValueTest()
644 std::string ciphertext; in PolicyAndTest() local
646 "plaintext", nullptr, &ciphertext); in PolicyAndTest()
666 ciphertext, policy_session->GetDelegate(), in PolicyAndTest()
766 std::string ciphertext; in PolicyOrTest() local
768 "plaintext", nullptr, &ciphertext); in PolicyOrTest()
787 ciphertext, policy_session->GetDelegate(), in PolicyOrTest()
962 std::string ciphertext; in PerformRSAEncrpytAndDecrpyt() local
[all …]

12