Fix clang-tidy performance warnings in keymaster.
am: 68ecd28e87

Change-Id: Id3789808369a9c71c92354d0f31889b8a61ad2d1
diff --git a/android_keymaster_test_utils.cpp b/android_keymaster_test_utils.cpp
index fe0a464..ecaee62 100644
--- a/android_keymaster_test_utils.cpp
+++ b/android_keymaster_test_utils.cpp
@@ -622,7 +622,7 @@
     return error;
 }
 
-void Keymaster2Test::CheckHmacTestVector(string key, string message, keymaster_digest_t digest,
+void Keymaster2Test::CheckHmacTestVector(const string& key, const string& message, keymaster_digest_t digest,
                                          string expected_mac) {
     ASSERT_EQ(KM_ERROR_OK, ImportKey(AuthorizationSetBuilder()
                                          .HmacKey(key.size() * 8)
diff --git a/android_keymaster_test_utils.h b/android_keymaster_test_utils.h
index e5c90bd..25d4cf5 100644
--- a/android_keymaster_test_utils.h
+++ b/android_keymaster_test_utils.h
@@ -274,7 +274,7 @@
                                keymaster_block_mode_t block_mode, keymaster_padding_t padding,
                                const std::string& nonce);
 
-    void CheckHmacTestVector(std::string key, std::string message, keymaster_digest_t digest,
+    void CheckHmacTestVector(const std::string& key, const std::string& message, keymaster_digest_t digest,
                              std::string expected_mac);
     void CheckAesOcbTestVector(const std::string& key, const std::string& nonce,
                                const std::string& associated_data, const std::string& message,
diff --git a/ecies_kem.cpp b/ecies_kem.cpp
index b726834..2e31573 100644
--- a/ecies_kem.cpp
+++ b/ecies_kem.cpp
@@ -22,7 +22,7 @@
 namespace keymaster {
 
 EciesKem::EciesKem(const AuthorizationSet& kem_description, keymaster_error_t* error) {
-    AuthorizationSet authorizations(kem_description);
+    const AuthorizationSet& authorizations(kem_description);
 
     if (!authorizations.GetTagValue(TAG_EC_CURVE, &curve_)) {
         LOG_E("%s", "EciesKem: no curve specified");
diff --git a/rsa_key_factory.cpp b/rsa_key_factory.cpp
index c17d9e8..e6c3f8c 100644
--- a/rsa_key_factory.cpp
+++ b/rsa_key_factory.cpp
@@ -56,7 +56,7 @@
     if (!key_blob || !hw_enforced || !sw_enforced)
         return KM_ERROR_OUTPUT_PARAMETER_NULL;
 
-    AuthorizationSet authorizations(key_description);
+    const AuthorizationSet& authorizations(key_description);
 
     uint64_t public_exponent;
     if (!authorizations.GetTagValue(TAG_RSA_PUBLIC_EXPONENT, &public_exponent)) {