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