Subversion Repositories tpanel

Rev

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

Rev 446 Rev 459
Line 15... Line 15...
15
 * along with this program; if not, write to the Free Software Foundation,
15
 * along with this program; if not, write to the Free Software Foundation,
16
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
16
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
17
 */
17
 */
18
 
18
 
19
#include "tprjresources.h"
19
#include "tprjresources.h"
-
 
20
#include "tbytearray.h"
20
#include "terror.h"
21
#include "terror.h"
21
 
22
 
22
using std::string;
23
using std::string;
23
using std::vector;
24
using std::vector;
24
 
25
 
Line 269... Line 270...
269
    }
270
    }
270
 
271
 
271
    itRlist->ressource.push_back(r);
272
    itRlist->ressource.push_back(r);
272
    return true;
273
    return true;
273
}
274
}
-
 
275
 
-
 
276
string TPrjResources::decryptPassword(const string& pw)
-
 
277
{
-
 
278
    DECL_TRACER("TPrjResources::decryptPassword(const string& pw)");
-
 
279
 
-
 
280
    string erg;
-
 
281
    size_t len;
-
 
282
    unsigned char *bytes = TByteArray::hexStrToByte(pw, &len);
-
 
283
 
-
 
284
    if (bytes == nullptr || (len % 16) != 0)
-
 
285
        return erg;
-
 
286
 
-
 
287
    // TODO: Implement DES-CBC algorithm to decrypt
-
 
288
    erg.assign(reinterpret_cast<char *>(bytes), len);
-
 
289
    return erg;
-
 
290
}