/system/connectivity/shill/ |
H A D | crypto_des_cbc.cc | 42 bool CryptoDESCBC::Encrypt(const string& plaintext, string* ciphertext) { argument 48 bool CryptoDESCBC::Decrypt(const string& ciphertext, string* plaintext) { argument 52 string b64_ciphertext = ciphertext; 53 if (base::StartsWith(ciphertext, kVersion2Prefix, 61 LOG(ERROR) << "Unable to base64-decode DEC-CBC ciphertext."; 68 LOG(ERROR) << "Invalid DES-CBC ciphertext size: " << data.size();
|
H A D | crypto_des_cbc_unittest.cc | 97 string ciphertext; local 98 EXPECT_FALSE(crypto_.Encrypt(kPlainText, &ciphertext));
|
H A D | crypto_provider.cc | 49 string ciphertext; local 50 if (crypto->Encrypt(plaintext, &ciphertext)) { 52 return prefix + ciphertext; 59 string CryptoProvider::Decrypt(const string& ciphertext) { argument 62 if (base::StartsWith(ciphertext, prefix, base::CompareCase::SENSITIVE)) { 63 string to_decrypt = ciphertext; 74 return ciphertext;
|
H A D | crypto_rot47.cc | 31 bool CryptoROT47::Encrypt(const string& plaintext, string* ciphertext) { argument 37 *ciphertext = plaintext; 38 for (auto& ch : *ciphertext) { 48 bool CryptoROT47::Decrypt(const string& ciphertext, string* plaintext) { argument 50 return Encrypt(ciphertext, plaintext);
|
/system/keymaster/ |
H A D | android_keymaster_test.cpp | 1916 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); local 1917 string plaintext = DecryptMessage(ciphertext, KM_MODE_ECB, KM_PAD_PKCS7); 1970 string ciphertext = EncryptMessage(message, KM_PAD_NONE); local 1971 EXPECT_EQ(256U / 8, ciphertext.size()); 1974 string plaintext = DecryptMessage(ciphertext, KM_PAD_NONE); 2092 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); local 2093 EXPECT_EQ(key_size / 8, ciphertext.size()); 2095 string plaintext = DecryptMessage(ciphertext, KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); 2109 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_224, KM_PAD_RSA_OAEP); local 2110 EXPECT_EQ(key_size / 8, ciphertext 2169 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); local 2213 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); local 2254 string ciphertext = EncryptMessage(message, KM_PAD_RSA_PKCS1_1_5_ENCRYPT); local 2292 string ciphertext = EncryptMessage(message, digest, padding); local 2325 string ciphertext = EncryptMessage(string(message), KM_PAD_RSA_PKCS1_1_5_ENCRYPT); local 2427 string ciphertext; local 2445 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); local 2479 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); local 2537 string ciphertext; local 2568 const char* ciphertext; member in struct:keymaster::test::AesCtrSp80038aTestVector 2607 const string ciphertext = hex2str(test.ciphertext); local 2755 string ciphertext; local 2792 string ciphertext = EncryptMessage(message, KM_MODE_CBC, KM_PAD_PKCS7, &iv); local 2820 string ciphertext; local 2886 string ciphertext; local 2912 uint8_t ciphertext[] = { local 2985 string ciphertext; local 3026 string ciphertext; local 3098 string ciphertext; local 3152 string ciphertext; local 3196 string ciphertext; local 3238 string ciphertext; local 3678 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); local 3724 string ciphertext = EncryptMessage(message, KM_PAD_NONE); local [all...] |
H A D | android_keymaster_test_utils.cpp | 475 string ciphertext = local 484 return ciphertext; 506 string ciphertext = local 515 return ciphertext; 525 string ciphertext = local 534 return ciphertext; 545 string Keymaster2Test::DecryptMessage(const string& ciphertext, keymaster_padding_t padding) { argument 550 return ProcessMessage(KM_PURPOSE_DECRYPT, ciphertext, begin_params, update_params); 553 string Keymaster2Test::DecryptMessage(const string& ciphertext, keymaster_digest_t digest, argument 560 return ProcessMessage(KM_PURPOSE_DECRYPT, ciphertext, begin_param 563 DecryptMessage(const string& ciphertext, keymaster_block_mode_t block_mode, keymaster_padding_t padding) argument 573 DecryptMessage(const string& ciphertext, keymaster_digest_t digest, keymaster_padding_t padding, const string& nonce) argument 584 DecryptMessage(const string& ciphertext, keymaster_block_mode_t block_mode, keymaster_padding_t padding, const string& nonce) argument 595 DecryptMessage(const AuthorizationSet& update_params, const string& ciphertext, keymaster_digest_t digest, keymaster_padding_t padding, const string& nonce) argument 651 string ciphertext = local [all...] |
H A D | ocb_utils.cpp | 122 KeymasterKeyBlob* ciphertext, Buffer* tag) { 123 assert(ciphertext && tag); 137 if (!ciphertext->Reset(plaintext.key_material_size)) 142 0 /* additional data length */, ciphertext->writable_data(), 157 const KeymasterKeyBlob& ciphertext, const Buffer& nonce, 173 if (!plaintext->Reset(ciphertext.key_material_size)) 176 int ae_err = ae_decrypt(ctx.get(), nonce.peek_read(), ciphertext.key_material, 177 ciphertext.key_material_size, NULL /* additional data */, 190 assert(ae_err == static_cast<int>(ciphertext.key_material_size)); 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
|
/system/tpm/trunks/ |
H A D | tpm_utility_impl.cc | 414 std::string* ciphertext) { 468 ciphertext->assign(StringFrom_TPM2B_PUBLIC_KEY_RSA(out_message)); 475 const std::string& ciphertext, 523 TPM2B_PUBLIC_KEY_RSA in_message = Make_TPM2B_PUBLIC_KEY_RSA(ciphertext); 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
|
H A D | tpm_utility_test.cc | 489 std::string output_ciphertext("ciphertext"); 490 std::string ciphertext; local 511 &ciphertext)); 512 EXPECT_EQ(0, ciphertext.compare(output_ciphertext)); 518 std::string ciphertext; local 534 &ciphertext)); 540 std::string ciphertext; local 552 &ciphertext)); 558 std::string output_ciphertext("ciphertext"); 559 std::string ciphertext; local 589 std::string ciphertext; local 618 std::string ciphertext; local 648 std::string ciphertext; local 672 std::string ciphertext; local 692 std::string ciphertext; local 703 std::string ciphertext; local 735 std::string ciphertext; local [all...] |
H A D | trunks_client_test.cc | 479 std::string ciphertext; local 483 &ciphertext); 497 TPM_ALG_NULL, ciphertext, 644 std::string ciphertext; local 646 "plaintext", nullptr, &ciphertext); 666 ciphertext, policy_session->GetDelegate(), 766 std::string ciphertext; local 768 "plaintext", nullptr, &ciphertext); 787 ciphertext, policy_session->GetDelegate(), 962 std::string ciphertext; local [all...] |
/system/vold/ |
H A D | KeyStorage.cpp | 141 const std::string& message, std::string* ciphertext) { 160 *ciphertext = nonce + body + mac; 166 const std::string& ciphertext, std::string* message) { 167 auto nonce = ciphertext.substr(0, GCM_NONCE_BYTES); 168 auto bodyAndMac = ciphertext.substr(GCM_NONCE_BYTES); 139 encryptWithKeymasterKey(Keymaster& keymaster, const std::string& key, const KeyAuthentication& auth, const std::string& appId, const std::string& message, std::string* ciphertext) argument 164 decryptWithKeymasterKey(Keymaster& keymaster, const std::string& key, const KeyAuthentication& auth, const std::string& appId, const std::string& ciphertext, std::string* message) argument
|
/system/weaved/buffet/ |
H A D | keystore_encryptor.cc | 40 std::string* ciphertext) { 42 ciphertext); 45 bool KeystoreEncryptor::DecryptWithAuthentication(const std::string& ciphertext, argument 47 return keystore_->decryptWithAuthentication(kBuffetKeyName, ciphertext, 39 EncryptWithAuthentication(const std::string& plaintext, std::string* ciphertext) argument
|
/system/webservd/webservd/ |
H A D | keystore_encryptor.cc | 40 std::string* ciphertext) { 42 ciphertext); 45 bool KeystoreEncryptor::DecryptWithAuthentication(const std::string& ciphertext, argument 47 return keystore_->decryptWithAuthentication(kWebserverKeyName, ciphertext, 39 EncryptWithAuthentication(const std::string& plaintext, std::string* ciphertext) argument
|