Index: components/encryptor/os_crypt_mac.mm |
diff --git a/components/encryptor/encryptor_mac.mm b/components/encryptor/os_crypt_mac.mm |
similarity index 86% |
rename from components/encryptor/encryptor_mac.mm |
rename to components/encryptor/os_crypt_mac.mm |
index 583f18af62618a4b33f06edd70bc6979b29c043e..13d6c2e530f34c0b557ee58e17f994c0afb57352 100644 |
--- a/components/encryptor/encryptor_mac.mm |
+++ b/components/encryptor/os_crypt_mac.mm |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "components/encryptor/encryptor.h" |
+#include "components/encryptor/os_crypt.h" |
#include <CommonCrypto/CommonCryptor.h> // for kCCBlockSizeAES128 |
@@ -10,8 +10,8 @@ |
#include "base/logging.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/strings/utf_string_conversions.h" |
-#include "components/encryptor/encryptor_password_mac.h" |
#include "components/encryptor/encryptor_switches.h" |
+#include "components/encryptor/keychain_password_mac.h" |
#include "crypto/apple_keychain.h" |
#include "crypto/encryptor.h" |
#include "crypto/symmetric_key.h" |
@@ -51,8 +51,8 @@ crypto::SymmetricKey* GetEncryptionKey() { |
password = "mock_password"; |
} else { |
AppleKeychain keychain; |
- EncryptorPassword encryptor_password(keychain); |
- password = encryptor_password.GetEncryptorPassword(); |
+ KeychainPassword encryptor_password(keychain); |
+ password = encryptor_password.GetPassword(); |
} |
if (password.empty()) |
@@ -74,13 +74,13 @@ crypto::SymmetricKey* GetEncryptionKey() { |
} // namespace |
-bool Encryptor::EncryptString16(const base::string16& plaintext, |
- std::string* ciphertext) { |
+bool OSCrypt::EncryptString16(const base::string16& plaintext, |
+ std::string* ciphertext) { |
return EncryptString(base::UTF16ToUTF8(plaintext), ciphertext); |
} |
-bool Encryptor::DecryptString16(const std::string& ciphertext, |
- base::string16* plaintext) { |
+bool OSCrypt::DecryptString16(const std::string& ciphertext, |
+ base::string16* plaintext) { |
std::string utf8; |
if (!DecryptString(ciphertext, &utf8)) |
return false; |
@@ -89,8 +89,8 @@ bool Encryptor::DecryptString16(const std::string& ciphertext, |
return true; |
} |
-bool Encryptor::EncryptString(const std::string& plaintext, |
- std::string* ciphertext) { |
+bool OSCrypt::EncryptString(const std::string& plaintext, |
+ std::string* ciphertext) { |
if (plaintext.empty()) { |
*ciphertext = std::string(); |
return true; |
@@ -113,8 +113,8 @@ bool Encryptor::EncryptString(const std::string& plaintext, |
return true; |
} |
-bool Encryptor::DecryptString(const std::string& ciphertext, |
- std::string* plaintext) { |
+bool OSCrypt::DecryptString(const std::string& ciphertext, |
+ std::string* plaintext) { |
if (ciphertext.empty()) { |
*plaintext = std::string(); |
return true; |
@@ -149,7 +149,7 @@ bool Encryptor::DecryptString(const std::string& ciphertext, |
return true; |
} |
-void Encryptor::UseMockKeychain(bool use_mock) { |
+void OSCrypt::UseMockKeychain(bool use_mock) { |
use_mock_keychain = use_mock; |
} |