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,
34  TWOFISH = 1,
38  SAFERPLUS = 5,
39  RC2 = 6,
40  XTEA = 7,
41  SERPENT = 8,
42  SAFERSK64 = 9,
43  SAFERSK128 = 10,
44  CAST256 = 11,
45  LOKI97 = 12,
46  GOST = 13,
47  THREEWAY = 14,
48  CAST128 = 15,
49  BLOWFISH = 16,
50  DES = 17,
51  TRIPLEDES = 18,
52  ENIGMA = 19,
53  ARCFOUR = 20,
54  PANAMA = 21,
55  WAKE = 22
56  } ;
57 
58  EncryptionAlgorithm (void) ;
59  EncryptionAlgorithm (IRep irep) ;
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 ;
100  } Translation ;
101  static const Translation Translations[] ;
102 } ;
103 
104 #endif // ndef SH_ENCALGO_H