| Index: components/encryptor/os_crypt_mac.mm
|
| diff --git a/components/encryptor/encryptor_mac.mm b/components/encryptor/os_crypt_mac.mm
|
| similarity index 89%
|
| rename from components/encryptor/encryptor_mac.mm
|
| rename to components/encryptor/os_crypt_mac.mm
|
| index 583f18af62618a4b33f06edd70bc6979b29c043e..90c9d2a2fb5cff494cf0cb650f908aef71398185 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
|
|
|
| @@ -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;
|
| }
|
|
|
|
|