Darin Petkov | 877642b | 2011-06-27 13:37:22 -0700 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef SHILL_CRYPTO_ROT47_ |
| 6 | #define SHILL_CRYPTO_ROT47_ |
| 7 | |
Darin Petkov | 86964e0 | 2011-06-29 13:49:28 -0700 | [diff] [blame] | 8 | #include <base/basictypes.h> |
| 9 | |
Darin Petkov | 877642b | 2011-06-27 13:37:22 -0700 | [diff] [blame] | 10 | #include "shill/crypto_interface.h" |
| 11 | |
| 12 | namespace shill { |
| 13 | |
| 14 | // ROT47 crypto module implementation. |
| 15 | class CryptoROT47 : public CryptoInterface { |
| 16 | public: |
| 17 | static const char kID[]; |
| 18 | |
Darin Petkov | 86964e0 | 2011-06-29 13:49:28 -0700 | [diff] [blame] | 19 | CryptoROT47(); |
| 20 | |
Darin Petkov | 877642b | 2011-06-27 13:37:22 -0700 | [diff] [blame] | 21 | // Inherited from CryptoInterface. |
| 22 | virtual std::string GetID(); |
| 23 | virtual bool Encrypt(const std::string &plaintext, std::string *ciphertext); |
| 24 | virtual bool Decrypt(const std::string &ciphertext, std::string *plaintext); |
Darin Petkov | 86964e0 | 2011-06-29 13:49:28 -0700 | [diff] [blame] | 25 | |
| 26 | private: |
| 27 | DISALLOW_COPY_AND_ASSIGN(CryptoROT47); |
Darin Petkov | 877642b | 2011-06-27 13:37:22 -0700 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | } // namespace shill |
| 31 | |
| 32 | #endif // SHILL_CRYPTO_ROT47_ |