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 | |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 5 | #ifndef SHILL_CRYPTO_ROT47_H_ |
| 6 | #define SHILL_CRYPTO_ROT47_H_ |
Darin Petkov | 877642b | 2011-06-27 13:37:22 -0700 | [diff] [blame] | 7 | |
Alex Vakulenko | 8a53229 | 2014-06-16 17:18:44 -0700 | [diff] [blame] | 8 | #include <string> |
| 9 | |
Ben Chan | cc67c52 | 2014-09-03 07:19:18 -0700 | [diff] [blame] | 10 | #include <base/macros.h> |
Darin Petkov | 86964e0 | 2011-06-29 13:49:28 -0700 | [diff] [blame] | 11 | |
Darin Petkov | 877642b | 2011-06-27 13:37:22 -0700 | [diff] [blame] | 12 | #include "shill/crypto_interface.h" |
| 13 | |
| 14 | namespace shill { |
| 15 | |
| 16 | // ROT47 crypto module implementation. |
| 17 | class CryptoROT47 : public CryptoInterface { |
| 18 | public: |
| 19 | static const char kID[]; |
| 20 | |
Darin Petkov | 86964e0 | 2011-06-29 13:49:28 -0700 | [diff] [blame] | 21 | CryptoROT47(); |
| 22 | |
Darin Petkov | 877642b | 2011-06-27 13:37:22 -0700 | [diff] [blame] | 23 | // Inherited from CryptoInterface. |
| 24 | virtual std::string GetID(); |
Paul Stewart | a794cd6 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 25 | virtual bool Encrypt(const std::string& plaintext, std::string* ciphertext); |
| 26 | virtual bool Decrypt(const std::string& ciphertext, std::string* plaintext); |
Darin Petkov | 86964e0 | 2011-06-29 13:49:28 -0700 | [diff] [blame] | 27 | |
| 28 | private: |
| 29 | DISALLOW_COPY_AND_ASSIGN(CryptoROT47); |
Darin Petkov | 877642b | 2011-06-27 13:37:22 -0700 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | } // namespace shill |
| 33 | |
Ben Chan | c45688b | 2014-07-02 23:50:45 -0700 | [diff] [blame] | 34 | #endif // SHILL_CRYPTO_ROT47_H_ |