blob: c99242ff4368d54352c46e5dd4b929626b94225a [file] [log] [blame]
Darin Petkov877642b2011-06-27 13:37:22 -07001// 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 Petkov86964e02011-06-29 13:49:28 -07008#include <base/basictypes.h>
9
Darin Petkov877642b2011-06-27 13:37:22 -070010#include "shill/crypto_interface.h"
11
12namespace shill {
13
14// ROT47 crypto module implementation.
15class CryptoROT47 : public CryptoInterface {
16 public:
17 static const char kID[];
18
Darin Petkov86964e02011-06-29 13:49:28 -070019 CryptoROT47();
20
Darin Petkov877642b2011-06-27 13:37:22 -070021 // 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 Petkov86964e02011-06-29 13:49:28 -070025
26 private:
27 DISALLOW_COPY_AND_ASSIGN(CryptoROT47);
Darin Petkov877642b2011-06-27 13:37:22 -070028};
29
30} // namespace shill
31
32#endif // SHILL_CRYPTO_ROT47_