Subversion Repositories tpanel

Rev

Rev 475 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 475 Rev 476
Line 49... Line 49...
49
#endif
49
#endif
50
 
50
 
51
using namespace reader;
51
using namespace reader;
52
using namespace std;
52
using namespace std;
53
 
53
 
-
 
54
/**
-
 
55
 * @brief Password
-
 
56
 * This definitions are the password and salt used to encrypt all XML files
-
 
57
 * in a TP5 file (produced by TPDesign5).
-
 
58
 * TPanel is using it to decrypt the files. All files other then XML files
-
 
59
 * are not encrypted or zipped.
-
 
60
 * 
-
 
61
 * The encryption was done with the following settings:
-
 
62
 *  Cipher: AES-128-CBC
-
 
63
 *  Digest: SHA1
-
 
64
 *  Iterations: 5
-
 
65
 */
-
 
66
string password = "8P0puxB5OVUFI6uX";
-
 
67
string salt = "MarkRobs";
-
 
68
 
54
ReadTP4::~ReadTP4()
69
ReadTP4::~ReadTP4()
55
{
70
{
56
    DECL_TRACER("ReadTP4::~ReadTP4()");
71
    DECL_TRACER("ReadTP4::~ReadTP4()");
57
 
72
 
58
    deleteIndex();
73
    deleteIndex();
Line 205... Line 220...
205
            }
220
            }
206
            else if (encrypted)
221
            else if (encrypted)
207
            {
222
            {
208
                MSG_DEBUG("Decrypting file " << ofile << " ...");
223
                MSG_DEBUG("Decrypting file " << ofile << " ...");
209
                TScramble scramble;
224
                TScramble scramble;
-
 
225
                scramble.aesInit(password, salt);
210
 
226
 
211
                if (!scramble.aesDecodeFile(ofile))
227
                if (!scramble.aesDecodeFile(ofile))
212
                {
228
                {
213
                    MSG_WARNING("Error decrypting file " << ofile << "!");
229
                    MSG_WARNING("Error decrypting file " << ofile << "!");
214
                }
230
                }