blob: 0702641df1254d78e35e05df8c4c474928626a22 [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
Ben Chanc45688b2014-07-02 23:50:45 -07005#ifndef SHILL_CRYPTO_ROT47_H_
6#define SHILL_CRYPTO_ROT47_H_
Darin Petkov877642b2011-06-27 13:37:22 -07007
Alex Vakulenko8a532292014-06-16 17:18:44 -07008#include <string>
9
Ben Chancc67c522014-09-03 07:19:18 -070010#include <base/macros.h>
Darin Petkov86964e02011-06-29 13:49:28 -070011
Darin Petkov877642b2011-06-27 13:37:22 -070012#include "shill/crypto_interface.h"
13
14namespace shill {
15
16// ROT47 crypto module implementation.
17class CryptoROT47 : public CryptoInterface {
18 public:
19 static const char kID[];
20
Darin Petkov86964e02011-06-29 13:49:28 -070021 CryptoROT47();
22
Darin Petkov877642b2011-06-27 13:37:22 -070023 // Inherited from CryptoInterface.
24 virtual std::string GetID();
Paul Stewarta794cd62015-06-16 13:13:10 -070025 virtual bool Encrypt(const std::string& plaintext, std::string* ciphertext);
26 virtual bool Decrypt(const std::string& ciphertext, std::string* plaintext);
Darin Petkov86964e02011-06-29 13:49:28 -070027
28 private:
29 DISALLOW_COPY_AND_ASSIGN(CryptoROT47);
Darin Petkov877642b2011-06-27 13:37:22 -070030};
31
32} // namespace shill
33
Ben Chanc45688b2014-07-02 23:50:45 -070034#endif // SHILL_CRYPTO_ROT47_H_