blob: b58d1cc2b351b2f11e2ca431befc48bf85648aba [file] [log] [blame] [edit]
// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_GCM_DRIVER_SYSTEM_ENCRYPTOR_H_
#define COMPONENTS_GCM_DRIVER_SYSTEM_ENCRYPTOR_H_
#include "base/compiler_specific.h"
#include "components/os_crypt/async/common/encryptor.h"
#include "google_apis/gcm/base/encryptor.h"
namespace gcm {
// Encryptor that uses the Chrome password manager's encryptor.
class SystemEncryptor : public Encryptor {
public:
explicit SystemEncryptor(os_crypt_async::Encryptor encryptor);
~SystemEncryptor() override;
bool EncryptString(const std::string& plaintext,
std::string* ciphertext) override;
bool DecryptString(const std::string& ciphertext,
std::string* plaintext) override;
private:
os_crypt_async::Encryptor encryptor_;
};
} // namespace gcm
#endif // COMPONENTS_GCM_DRIVER_SYSTEM_ENCRYPTOR_H_