blob: 9bf11492af198e04277ec8d7ca098422d6986e26 [file] [log] [blame]
// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
namespace shill {
// An interface to an encryption/decryption module.
class CryptoInterface {
virtual ~CryptoInterface() {}
// Returns a unique identifier for this crypto module.
virtual std::string GetID() = 0;
// Encrypts |plaintext| into |ciphertext|. Returns true on success.
virtual bool Encrypt(const std::string &plaintext,
std::string *ciphertext) = 0;
// Decrypts |ciphertext| into |plaintext|. Returns true on success.
virtual bool Decrypt(const std::string &ciphertext,
std::string *plaintext) = 0;
} // namespace shill