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::Translations
static const Translation Translations[]
Definition EncryptionAlgorithm.h:98
EncryptionAlgorithm::IRep
IRep
integer representation of encryption algorithm
Definition EncryptionAlgorithm.h:32
EncryptionAlgorithm::GOST
@ GOST
Definition EncryptionAlgorithm.h:46
EncryptionAlgorithm::BLOWFISH
@ BLOWFISH
Definition EncryptionAlgorithm.h:49
EncryptionAlgorithm::RIJNDAEL192
@ RIJNDAEL192
Definition EncryptionAlgorithm.h:36
EncryptionAlgorithm::TRIPLEDES
@ TRIPLEDES
Definition EncryptionAlgorithm.h:51
EncryptionAlgorithm::SERPENT
@ SERPENT
Definition EncryptionAlgorithm.h:41
EncryptionAlgorithm::RIJNDAEL256
@ RIJNDAEL256
Definition EncryptionAlgorithm.h:37
EncryptionAlgorithm::SAFERSK64
@ SAFERSK64
Definition EncryptionAlgorithm.h:42
EncryptionAlgorithm::RIJNDAEL128
@ RIJNDAEL128
Definition EncryptionAlgorithm.h:35
EncryptionAlgorithm::CAST256
@ CAST256
Definition EncryptionAlgorithm.h:44
EncryptionAlgorithm::RC2
@ RC2
Definition EncryptionAlgorithm.h:39
EncryptionAlgorithm::THREEWAY
@ THREEWAY
Definition EncryptionAlgorithm.h:47
EncryptionAlgorithm::ENIGMA
@ ENIGMA
Definition EncryptionAlgorithm.h:52
EncryptionAlgorithm::WAKE
@ WAKE
Definition EncryptionAlgorithm.h:55
EncryptionAlgorithm::NONE
@ NONE
Definition EncryptionAlgorithm.h:33
EncryptionAlgorithm::ARCFOUR
@ ARCFOUR
Definition EncryptionAlgorithm.h:53
EncryptionAlgorithm::DES
@ DES
Definition EncryptionAlgorithm.h:50
EncryptionAlgorithm::SAFERPLUS
@ SAFERPLUS
Definition EncryptionAlgorithm.h:38
EncryptionAlgorithm::TWOFISH
@ TWOFISH
Definition EncryptionAlgorithm.h:34
EncryptionAlgorithm::LOKI97
@ LOKI97
Definition EncryptionAlgorithm.h:45
EncryptionAlgorithm::CAST128
@ CAST128
Definition EncryptionAlgorithm.h:48
EncryptionAlgorithm::SAFERSK128
@ SAFERSK128
Definition EncryptionAlgorithm.h:43
EncryptionAlgorithm::PANAMA
@ PANAMA
Definition EncryptionAlgorithm.h:54
EncryptionAlgorithm::XTEA
@ XTEA
Definition EncryptionAlgorithm.h:40
EncryptionAlgorithm::translate
static std::string translate(IRep irep)
Definition EncryptionAlgorithm.cc:70
EncryptionAlgorithm::Translation
struct EncryptionAlgorithm::struct_Translation Translation
EncryptionAlgorithm::getIntegerRep
IRep getIntegerRep(void) const
Definition EncryptionAlgorithm.cc:49
EncryptionAlgorithm::setValue
void setValue(IRep irep)
Definition EncryptionAlgorithm.cc:39
EncryptionAlgorithm::operator==
bool operator==(const EncryptionAlgorithm &algo) const
Definition EncryptionAlgorithm.h:71
EncryptionAlgorithm::isValidIntegerRep
static bool isValidIntegerRep(unsigned int irep)
Definition EncryptionAlgorithm.cc:65
EncryptionAlgorithm::IRep_size
static const unsigned int IRep_size
number of bits needed to code the algorithm
Definition EncryptionAlgorithm.h:29
EncryptionAlgorithm::EncryptionAlgorithm
EncryptionAlgorithm(void)
Definition EncryptionAlgorithm.cc:24
EncryptionAlgorithm::isValidStringRep
static bool isValidStringRep(std::string srep)
Definition EncryptionAlgorithm.cc:54
EncryptionAlgorithm::NumValues
static const unsigned int NumValues
Definition EncryptionAlgorithm.h:94
EncryptionAlgorithm::getStringRep
std::string getStringRep(void) const
Definition EncryptionAlgorithm.cc:44
EncryptionAlgorithm::Value
IRep Value
Definition EncryptionAlgorithm.h:95
EncryptionAlgorithm::struct_Translation
Definition EncryptionAlgorithm.h:97
EncryptionAlgorithm::struct_Translation::srep
char * srep
Definition EncryptionAlgorithm.h:99
EncryptionAlgorithm::struct_Translation::irep
IRep irep
Definition EncryptionAlgorithm.h:98