Commit 90e2d80d authored by Jens Widell's avatar Jens Widell Committed by Commit Bot

Stop importing crypto::Encryptor into syncer namespace

In jumbo/unity builds, it conflicts with syncer::Encryptor defined in
components/sync/base/encryptor.h.

Change-Id: I0b9c4e6eafd88eae46892ff97f2ade41f8c0b99a
Reviewed-on: https://chromium-review.googlesource.com/822090Reviewed-by: default avatarPavel Yatsuk <pavely@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#523491}
parent 388d2254
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
using base::Base64Encode; using base::Base64Encode;
using base::Base64Decode; using base::Base64Decode;
using crypto::Encryptor;
using crypto::HMAC; using crypto::HMAC;
using crypto::SymmetricKey; using crypto::SymmetricKey;
...@@ -119,8 +118,8 @@ bool Nigori::Permute(Type type, ...@@ -119,8 +118,8 @@ bool Nigori::Permute(Type type,
NigoriStream plaintext; NigoriStream plaintext;
plaintext << type << name; plaintext << type << name;
Encryptor encryptor; crypto::Encryptor encryptor;
if (!encryptor.Init(encryption_key_.get(), Encryptor::CBC, if (!encryptor.Init(encryption_key_.get(), crypto::Encryptor::CBC,
std::string(kIvSize, 0))) std::string(kIvSize, 0)))
return false; return false;
...@@ -152,8 +151,8 @@ bool Nigori::Encrypt(const std::string& value, std::string* encrypted) const { ...@@ -152,8 +151,8 @@ bool Nigori::Encrypt(const std::string& value, std::string* encrypted) const {
std::string iv; std::string iv;
crypto::RandBytes(base::WriteInto(&iv, kIvSize + 1), kIvSize); crypto::RandBytes(base::WriteInto(&iv, kIvSize + 1), kIvSize);
Encryptor encryptor; crypto::Encryptor encryptor;
if (!encryptor.Init(encryption_key_.get(), Encryptor::CBC, iv)) if (!encryptor.Init(encryption_key_.get(), crypto::Encryptor::CBC, iv))
return false; return false;
std::string ciphertext; std::string ciphertext;
...@@ -206,8 +205,8 @@ bool Nigori::Decrypt(const std::string& encrypted, std::string* value) const { ...@@ -206,8 +205,8 @@ bool Nigori::Decrypt(const std::string& encrypted, std::string* value) const {
expected.size())) expected.size()))
return false; return false;
Encryptor encryptor; crypto::Encryptor encryptor;
if (!encryptor.Init(encryption_key_.get(), Encryptor::CBC, iv)) if (!encryptor.Init(encryption_key_.get(), crypto::Encryptor::CBC, iv))
return false; return false;
if (!encryptor.Decrypt(ciphertext, value)) if (!encryptor.Decrypt(ciphertext, value))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment