Скачиваний:
27
Добавлен:
01.05.2014
Размер:
819 б
Скачать
//---------------------------------------------------------------------------

#ifndef algH
#define algH

#include <string>

union convert
{
  unsigned long m_long;
  char m_char[4];
};

class CTea
{
  typedef unsigned int uint;

  // Исходная строка
  std::string m_origString;

  // Шифрованная строка
  std::string m_encString;

  // Сгенерированный ключ
  unsigned long m_password[4];

  const uint m_passSize;

  const char m_appendChar;

public:

  CTea();

  void setPassword(std::string str);

  // Функция шифрования
  void encrypt(std::string str);

  // Функция дешифровки
  void decrypt(std::string str);

  std::string getEncrypted();

  std::string getDecrypted();

};

//---------------------------------------------------------------------------
#endif
Соседние файлы в папке Лабораторная работа 21