EncryptionAlgorithm.h
Go to the documentation of this file.
/*
* steghide 0.5.1 - a steganography program
* Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef SH_ENCALGO_H
#define SH_ENCALGO_H
#include <string>
class EncryptionAlgorithm {
public:
static const unsigned int IRep_size = 5 ;
enum IRep {
NONE = 0,
TWOFISH = 1,
RIJNDAEL128 = 2,
RIJNDAEL192 = 3,
RIJNDAEL256 = 4,
SAFERPLUS = 5,
RC2 = 6,
XTEA = 7,
SERPENT = 8,
SAFERSK64 = 9,
SAFERSK128 = 10,
CAST256 = 11,
LOKI97 = 12,
GOST = 13,
THREEWAY = 14,
CAST128 = 15,
BLOWFISH = 16,
DES = 17,
TRIPLEDES = 18,
ENIGMA = 19,
ARCFOUR = 20,
PANAMA = 21,
WAKE = 22
} ;
EncryptionAlgorithm (void) ;
EncryptionAlgorithm (IRep irep) ;
EncryptionAlgorithm (std::string srep) ;
void setValue (IRep irep) ;
std::string getStringRep (void) const ;
IRep getIntegerRep (void) const ;
bool operator== (const EncryptionAlgorithm& algo) const
{ return (Value == algo.Value) ; } ;
static bool isValidStringRep (std::string srep) ;
static bool isValidIntegerRep (unsigned int irep) ;
static std::string translate (IRep irep) ;
static IRep translate (std::string srep) ;
private:
static const unsigned int NumValues = 23 ;
IRep Value ;
typedef struct struct_Translation {
IRep irep ;
char* srep ;
} Translation ;
static const Translation Translations[] ;
} ;
#endif // ndef SH_ENCALGO_H
EncryptionAlgorithm::Value
IRep Value
Definition: EncryptionAlgorithm.h:95
EncryptionAlgorithm::Translation
struct EncryptionAlgorithm::struct_Translation Translation
EncryptionAlgorithm::operator==
bool operator==(const EncryptionAlgorithm &algo) const
Definition: EncryptionAlgorithm.h:71
EncryptionAlgorithm::SAFERSK64
Definition: EncryptionAlgorithm.h:42
EncryptionAlgorithm::TRIPLEDES
Definition: EncryptionAlgorithm.h:51
EncryptionAlgorithm::DES
Definition: EncryptionAlgorithm.h:50
EncryptionAlgorithm::EncryptionAlgorithm
EncryptionAlgorithm(void)
Definition: EncryptionAlgorithm.cc:24
EncryptionAlgorithm::RIJNDAEL192
Definition: EncryptionAlgorithm.h:36
EncryptionAlgorithm::NumValues
static const unsigned int NumValues
Definition: EncryptionAlgorithm.h:94
EncryptionAlgorithm
Definition: EncryptionAlgorithm.h:26
EncryptionAlgorithm::THREEWAY
Definition: EncryptionAlgorithm.h:47
EncryptionAlgorithm::SAFERPLUS
Definition: EncryptionAlgorithm.h:38
EncryptionAlgorithm::isValidIntegerRep
static bool isValidIntegerRep(unsigned int irep)
Definition: EncryptionAlgorithm.cc:65
EncryptionAlgorithm::SERPENT
Definition: EncryptionAlgorithm.h:41
EncryptionAlgorithm::BLOWFISH
Definition: EncryptionAlgorithm.h:49
EncryptionAlgorithm::RIJNDAEL128
Definition: EncryptionAlgorithm.h:35
EncryptionAlgorithm::RIJNDAEL256
Definition: EncryptionAlgorithm.h:37
EncryptionAlgorithm::TWOFISH
Definition: EncryptionAlgorithm.h:34
EncryptionAlgorithm::PANAMA
Definition: EncryptionAlgorithm.h:54
EncryptionAlgorithm::LOKI97
Definition: EncryptionAlgorithm.h:45
EncryptionAlgorithm::ARCFOUR
Definition: EncryptionAlgorithm.h:53
EncryptionAlgorithm::GOST
Definition: EncryptionAlgorithm.h:46
EncryptionAlgorithm::Translations
static const Translation Translations[]
Definition: EncryptionAlgorithm.h:101
EncryptionAlgorithm::IRep
IRep
integer representation of encryption algorithm
Definition: EncryptionAlgorithm.h:32
EncryptionAlgorithm::ENIGMA
Definition: EncryptionAlgorithm.h:52
EncryptionAlgorithm::isValidStringRep
static bool isValidStringRep(std::string srep)
Definition: EncryptionAlgorithm.cc:54
EncryptionAlgorithm::NONE
Definition: EncryptionAlgorithm.h:33
EncryptionAlgorithm::struct_Translation::srep
char * srep
Definition: EncryptionAlgorithm.h:99
EncryptionAlgorithm::WAKE
Definition: EncryptionAlgorithm.h:55
EncryptionAlgorithm::SAFERSK128
Definition: EncryptionAlgorithm.h:43
EncryptionAlgorithm::IRep_size
static const unsigned int IRep_size
number of bits needed to code the algorithm
Definition: EncryptionAlgorithm.h:29
EncryptionAlgorithm::setValue
void setValue(IRep irep)
Definition: EncryptionAlgorithm.cc:39
EncryptionAlgorithm::XTEA
Definition: EncryptionAlgorithm.h:40
EncryptionAlgorithm::getStringRep
std::string getStringRep(void) const
Definition: EncryptionAlgorithm.cc:44
EncryptionAlgorithm::CAST256
Definition: EncryptionAlgorithm.h:44
EncryptionAlgorithm::getIntegerRep
IRep getIntegerRep(void) const
Definition: EncryptionAlgorithm.cc:49
EncryptionAlgorithm::RC2
Definition: EncryptionAlgorithm.h:39
EncryptionAlgorithm::CAST128
Definition: EncryptionAlgorithm.h:48
EncryptionAlgorithm::struct_Translation
Definition: EncryptionAlgorithm.h:97
EncryptionAlgorithm::struct_Translation::irep
IRep irep
Definition: EncryptionAlgorithm.h:98
EncryptionAlgorithm::translate
static std::string translate(IRep irep)
Definition: EncryptionAlgorithm.cc:70